-
Notifications
You must be signed in to change notification settings - Fork 3
Description
We have the need for a data structure that's something like a matrix or tensor with labeled columns.
A seed of this functionality is in grid.py
but this can be expanded.
Generating the grid from a configuration of the range for each dimension is currently in place, but this doesn't create an object with labels.
(Note that this is much like an xarray and one day might be replaced by it, but we need this to wrap a PyTorch tensor. I'm inclined to build what we need first and then swap in xarray later with a light wrapper if that works, because a 'grid' is not quite the same as an xarray (it's the 'coordinates' of the xarray without the values assigned to those coordinates.... I suppose it's also like a pandas dataframe?)
Other features:
- We'll need to be able to pass in additional data points (such as a 'natural borrowing constraint' for a discretized transitory income shock, in the
SolvingMicroDSOPs
style of problem) -- ideally these can be mathematical expressions and evaluated in scope - methods for changing the grid into other representations of the same data, when that's useful (i.e., a dict with keys as labels and one-dimensional tensors as values)
@alanlujan91 I wonder about your ideas about this since you've had experience with xarray-based solution frameworks before.