NonPredictionIntervalContextRequiredModelMixin

class NonPredictionIntervalContextRequiredModelMixin[source]

Bases: etna.models.mixins.ModelForecastingMixin

Mixin for models that don’t support prediction intervals and need context for prediction.

Inherited-members

Methods

forecast(ts, prediction_size[, ...])

Make predictions.

predict(ts, prediction_size[, return_components])

Make predictions with using true values as autoregression context if possible (teacher forcing).

forecast(ts: etna.datasets.tsdataset.TSDataset, prediction_size: int, return_components: bool = False) etna.datasets.tsdataset.TSDataset[source]

Make predictions.

Parameters
  • ts (etna.datasets.tsdataset.TSDataset) – Dataset with features

  • prediction_size (int) – Number of last timestamps to leave after making prediction. Previous timestamps will be used as a context for models that require it.

  • return_components (bool) – If True additionally returns forecast components

Returns

Dataset with predictions

Return type

etna.datasets.tsdataset.TSDataset

predict(ts: etna.datasets.tsdataset.TSDataset, prediction_size: int, return_components: bool = False) etna.datasets.tsdataset.TSDataset[source]

Make predictions with using true values as autoregression context if possible (teacher forcing).

Parameters
  • ts (etna.datasets.tsdataset.TSDataset) – Dataset with features

  • prediction_size (int) – Number of last timestamps to leave after making prediction. Previous timestamps will be used as a context for models that require it.

  • return_components (bool) – If True additionally returns prediction components

Returns

Dataset with predictions

Return type

etna.datasets.tsdataset.TSDataset