Seasonal and Trend Indices

For machine learning algorithms like Stochastic Gradient Boosting and Support Vector Machine to model complex relationships, the time series must be broken down into systematic and unsystematic components. Systematic components of the time series are components that have consistency or recurrence. For example, Trend (the increasing or decreasing value in the series) and Seasonality (the repeating short-term cycle in the series) are systematic components. The residual (the time series values after extracting systematic components) is referred to as an unsystematic component or noise. Other causal factors are used to model this component.

Demand Modeler leverages modern STL (Seasonal and Trend decomposition using Loess) methods to extract Seasonality and Trend components from time-series data. These components are then used as features in machine learning models.

Seasonality Cycle Index

Several local algorithms such as Auto Arima and Exponential Smoothing require users to specify a frequency parameter (seasonality cycle) in order to deliver accurate forecasts. Demand Modeler offers three methods to identify or specify this frequency parameter:

  • Auto-correlation function (ACF) (default method): this method does a simple seasonal decomposition on the target time series first, and calculates the auto-correlation function on the seasonal component. After that, it finds the highest peak in the ACF plot and the corresponding lag is returned as the seasonality cycle.

  • Fast Fourier transform (FFT): this method does a simple seasonal decomposition on the target time series first, and performs FFT on the seasonal component. After that, it finds the highest peak in the spectrum plot and the corresponding frequency. The seasonality cycle is calculated by 1/frequency.

  • Use specific value: this method allows users to provide the seasonality cycle they think makes sense themselves. Generally, it makes sense to use a cycle of 52 for weekly data, 7 for daily data, etc.

Note that the seasonality cycle identified here is used to generate the seasonality and trend features in the Trend Indices. It will also be used to generate the Fourier terms in the additional derived causals.

Last modified: Friday May 12, 2023

Is this useful?