Seasonality
Learn how to add seasonality to forecasts.
Using seasonality for forecasting
Seasonality refers to periodical patterns in the data, and it's a critical component of forecasting, particularly for data in which seasonal variations are big and consistent. Even though we can identify it visually, to use it for forecasting, we need a more complex model such as SARIMAX.
SARIMAX combines multiple time series components—Seasonality, Autoregression, Integration, Moving Average, and Exogenous variables. It takes essentially two parameters—order
, which refers to autoregression, integration, and moving average, and seasonal_order
, which refers to seasonality. To use it for seasonality purposes only, all we need to do is set order = (0,0,0)
and work only with seasonal_order
.
Let's understand how seasonal_order(P, D, Q, M)
works by calling the function parameters
is the seasonal component's autoregressive order. is the seasonal component's integration order. is the seasonal component's moving average order. is the periodicity. Since we have monthly data, we set it to 12
.
We always need to set
Seasonal component's autoregressive order
This is the seasonal_order(P, D, Q, M)
, so let's set order = (0,0,0)
and seasonal_order=(1,0,0,12)
.
Get hands-on with 1400+ tech skills courses.