MovingAverageModel¶
- class MovingAverageModel(window: int = 5)[source]¶
Bases:
etna.models.seasonal_ma.SeasonalMovingAverageModel
MovingAverageModel averages previous series values to forecast future one.
\[y_{t} = \frac{\sum_{i=1}^{n} y_{t-i} }{n},\]where \(n\) is window size.
Init MovingAverageModel.
- Parameters
window (int) – number of history points to average
- Inherited-members
Methods
fit
(ts)Fit model.
forecast
(ts)Make predictions.
get_model
()Get internal model.