ExponentialSmoothing is a statsmodels model class for forecasting time series by emphasizing recent observations and configuring level, trend, and seasonal components. section 7.4.6 section 7.4.7
Choose the configuration according to the patterns present in the series:
- Use simple exponential smoothing when the series has neither trend nor seasonal patterns. section 7.4.6
- Add trend='add' for double exponential smoothing, also called Holt’s linear trend model, when the series has a linear trend. section 7.4.6
- Add seasonal='add' and seasonal_periods for Holt–Winters forecasting when recurring seasonal variation accompanies trend. section 7.4.7
Fit a Holt–Winters model
Fit the model to training data with an additive trend, additive seasonality, and a five-observation seasonal cycle; then inspect AIC and BIC for comparison. section 7.4.7
>>> hw_model = ExponentialSmoothing(train, >>> trend = 'add', >>> seasonal = 'add', >>> seasonal_periods = 5).fit()
Use the listing to see the complete ExponentialSmoothing configuration for trend and seasonal components. section 7.4.7
