leaspy.models.factory¶
Classes¶
The available models that users can instantiate in Leaspy. |
Functions¶
|
Return the model object corresponding to |
Module Contents¶
- class ModelName[source]¶
-
The available models that users can instantiate in Leaspy.
- JOINT = 'joint'¶
- LOGISTIC = 'logistic'¶
- LINEAR = 'linear'¶
- SHARED_SPEED_LOGISTIC = 'shared_speed_logistic'¶
- LME = 'lme'¶
- CONSTANT = 'constant'¶
- MIXTURE_LOGISTIC = 'mixture_logistic'¶
- model_factory(name, instance_name=None, **kwargs)[source]¶
Return the model object corresponding to
namearg with possiblekwargs.- Parameters:
- name
stror ModelName - The name of the model class to be instantiated. Valid options include:
"joint""logistic""linear""shared_speed_logistic""lme""constant""mixture_logistic"
- instance_name
str, optional A custom name for the model instance. If not provided, the model’s name will be used as the instance name.
- **kwargs
Additional keyword arguments corresponding to the model’s hyperparameters. These must be valid for the specified model, or an error will be raised.
- name
- Returns:
BaseModelA child class object of
models.BaseModelclass object determined byname.
- Raises:
- ValueError
If an invalid model name is provided or the model cannot be instantiated with the provided arguments.
- Parameters:
- Return type: