DeadlineMovingAverageModel

class DeadlineMovingAverageModel(window: int = 3, seasonality: str = 'month')[source]

Bases: etna.models.mixins.PerSegmentModelMixin, etna.models.mixins.NonPredictionIntervalContextRequiredModelMixin, etna.models.base.NonPredictionIntervalContextRequiredAbstractModel

Moving average model that uses exact previous dates to predict.

Initialize deadline moving average model.

Length of the context is equal to the number of window months or years, depending on the seasonality.

Parameters
  • window (int) – Number of values taken for forecast for each point.

  • seasonality (str) – Only allowed monthly or annual seasonality.

Inherited-members

Methods

fit(ts)

Fit model.

forecast(ts, prediction_size)

Make predictions.

get_model()

Get internal model.

load(path)

Load an object.

predict(ts, prediction_size)

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

save(path)

Save the object.

to_dict()

Collect all information about etna object in dict.

Attributes

context_size

Upper bound to context size of the model.

get_model() Dict[str, etna.models.deadline_ma.DeadlineMovingAverageModel][source]

Get internal model.

Returns

Internal model

Return type

Dict[str, etna.models.deadline_ma.DeadlineMovingAverageModel]

property context_size: int

Upper bound to context size of the model.