Dataset#
The Dataset class is the primary data structure in Larch. It is an
extension of xarray.Dataset, with additional methods and attributes
specific to discrete choice modeling, collected under the dc accessor.
All of the larch-specific discrete choice methods and attributes on the
Dataset documented here are invoked using Dataset.dc.*.
Dataset.dc Constructors#
|
Construct a Dataset from an idca-format DataFrame. |
|
Construct a Dataset from a sparse idca-format DataFrame. |
|
Construct a Dataset from an idco-format DataFrame. |
Dataset.dc Attributes#
The number of discrete choice cases in this Dataset. |
|
The number of discrete choice alternatives in this Dataset. |
|
Str : The _caseid_ dimension of this Dataset, if defined. |
|
The _altid_ dimension of this Dataset, if defined. |
|
Mapping of alternative codes to names. |
Dataset.dc Methods#
Access the caseids coordinates as an index. |
|
|
Dissolve dimension on variables where it has no variance. |
|
Return a new dataset with each array indexed along the CASEID dimension. |
|
Set the alternative ids for this Dataset. |
|
Set the alternative names for this Dataset. |
|
Set the dtypes for the variables in this Dataset. |
|
Set up a new Flow for analysis using the structure of this DataTree. |
|
Access or evaluate an expression. |