SeasonalMovingAverageModel¶
- class SeasonalMovingAverageModel(window: int = 5, seasonality: int = 7)[source]¶
Bases:
etna.models.base.PerSegmentModel
Seasonal moving average.
\[y_{t} = \frac{\sum_{i=1}^{n} y_{t-is} }{n},\]where \(s\) is seasonality, \(n\) is window size (how many history values are taken for forecast).
Initialize seasonal moving average model.
Length of remembered tail of series is
window * seasonality
.- Parameters
window (int) – Number of values taken for forecast for each point.
seasonality (int) – Lag between values taken for forecast.
- Inherited-members
Methods
fit
(ts)Fit model.
forecast
(ts)Make predictions.
Get internal model.
- get_model() Dict[str, etna.models.seasonal_ma.SeasonalMovingAverageModel] [source]¶
Get internal model.
- Returns
Internal model
- Return type
Dict[str, etna.models.seasonal_ma.SeasonalMovingAverageModel]