leaspy.models.ModelFactory
- class ModelFactory
Bases:
objectReturn the wanted model given its name.
Methods
model(name, **kwargs)Return the model object corresponding to
namearg with possiblekwargs.- static model(name: str, **kwargs) BaseModel
Return the model object corresponding to
namearg with possiblekwargs.Check name type and value.
- Parameters:
- name
str The model’s name.
- **kwargs
Contains model’s hyper-parameters. Raise an error if the keyword is inappropriate for the given model’s name.
- name
- Returns:
BaseModelA child class object of
models.BaseModelclass object determined byname.
- Raises:
LeaspyModelInputErrorIf an incorrect model is requested.
See also