PerSegmentPredictionIntervalModel¶
- class PerSegmentPredictionIntervalModel(base_model: Any)[source]¶
Bases:
etna.models.base.PerSegmentBaseModel
,etna.models.base.PredictIntervalAbstractModel
Class for holding specific models for per-segment prediction which are able to build prediction intervals.
Init PerSegmentPredictionIntervalModel.
- 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[, prediction_interval, quantiles])Make predictions.
get_model
()Get internal models that are used inside etna class.
- forecast(ts: etna.datasets.tsdataset.TSDataset, prediction_interval: bool = False, quantiles: Sequence[float] = (0.025, 0.975)) etna.datasets.tsdataset.TSDataset [source]¶
Make predictions.
- Parameters
ts (etna.datasets.tsdataset.TSDataset) – Dataset with features
prediction_interval (bool) – If True returns prediction interval for forecast
quantiles (Sequence[float]) – Levels of prediction distribution. By default 2.5% and 97.5% are taken to form a 95% prediction interval
- Returns
Dataset with predictions
- Return type