leaspy.io.data.factory#
Defines the noise model factory.
Attributes#
Classes#
Enumeration defining the possible names for observation models. |
Functions#
|
Factory for observation models. |
Module Contents#
- class DataframeDataReaderNames(*args, **kwds)#
Bases:
enum.EnumEnumeration defining the possible names for observation models.
- EVENT = 'event'#
- VISIT = 'visit'#
- JOINT = 'joint'#
- COVARIATE = 'covariate'#
- classmethod from_string(reader_name)#
Returns the enum member corresponding to the given string.
- Parameters:
- reader_name
str The name of the reader, case-insensitive.
- reader_name
- Returns:
DataframeDataReaderNamesThe corresponding enum member.
- Raises:
NotImplementedErrorIf the provided reader_name does not match any of the enum members and is not implemented. Give the valid names in the error message.
- Parameters:
reader_name (str)
- DataframeDataReaderFactoryInput#
- dataframe_data_reader_factory(reader, **kwargs)#
Factory for observation models.
- Parameters:
- model
strorobs_modelsordict[str, …] If
obs_models, returns the instance.If a string, then returns a new instance of the appropriate class (with optional parameters kws).
If a dictionary, it must contain the ‘name’ key and other initialization parameters.
- **kwargs
Optional parameters for initializing the requested observation model when a string.
- model
- Returns:
AbstractDataframeDataReaderThe desired observation model.
- Raises:
LeaspyModelInputErrorIf model is not supported.
- Parameters:
reader (DataframeDataReaderFactoryInput)
- Return type: