MultiSegmentModel¶
- class MultiSegmentModel(base_model: Any)[source]¶
Bases:
etna.models.base.FitAbstractModel
,etna.models.base.ForecastAbstractModel
,etna.core.mixins.BaseMixin
Class for holding specific models for per-segment prediction.
Init MultiSegmentModel.
- 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.
forecast
(ts)Make predictions.
Get internal model that is used inside etna class.
- fit(ts: etna.datasets.tsdataset.TSDataset) etna.models.base.MultiSegmentModel [source]¶
Fit model.
- Parameters
ts (etna.datasets.tsdataset.TSDataset) – Dataset with features
- Returns
Model after fit
- Return type
- forecast(ts: etna.datasets.tsdataset.TSDataset) etna.datasets.tsdataset.TSDataset [source]¶
Make predictions.
- Parameters
ts (etna.datasets.tsdataset.TSDataset) – Dataset with features
- Returns
Dataset with predictions
- Return type
- get_model() Any [source]¶
Get internal model that is 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
Internal model
- Return type
Any