PerSegmentBaseModel¶
- class PerSegmentBaseModel(base_model: Any)[source]¶
Bases:
etna.models.base.FitAbstractModel
,etna.core.mixins.BaseMixin
Base class for holding specific models for per-segment prediction.
Init PerSegmentBaseModel.
- Parameters
base_model (Any) – Internal model which will be used to forecast segments, expected to have fit/predict interface
- Inherited-members
Methods
fit
(ts)Fit model.
Get internal models that are used inside etna class.
- fit(ts: etna.datasets.tsdataset.TSDataset) etna.models.base.PerSegmentBaseModel [source]¶
Fit model.
- Parameters
ts (etna.datasets.tsdataset.TSDataset) – Dataset with features
- Returns
Model after fit
- Return type
- get_model() Dict[str, Any] [source]¶
Get internal models that are used inside etna class.
Internal model is a model that is used inside etna to forecast segments, e.g.
catboost.CatBoostRegressor
orsklearn.linear_model.Ridge
.- Returns
dictionary where key is segment and value is internal model
- Return type
Dict[str, Any]