Overview
In this article, we review the algorithms that drive time series forecasting with Forecaster. These algorithms range from traditional statistical algorithms such as Exponential Smoothing (ETS), to those based on complex neural network algorithms such as DeepAR.
Before talking about the algorithms in more detail, it's important to know what types of data these algorithms can support. In addition to historical values, datasets can also include related time series data and item attributes. Related time series are data that change over time. They may correlate with the target values and may help improve the accuracy of the forecast. Examples include features such as price, promotions, and weather. Item attributes are categorical features that provide valuable context for the items in historical data. Unlike related time series datasets, item attributes datasets provide static data. That is, data values remain constant over time, such as a product category or type.
Algorithm Methods
Two of the time series forecasting algorithms are SARIMAX (ARIMA extended to incorporate seasonality and related data) and ETS (Exponential Smoothing). These are common statistical algorithms for time-series forecasting. They're especially useful for simple data sets with under 100 different periods. These algorithms work by attempting to "explain" a given time series based on its own past values (SARIMAX also uses related data), so that the resulting equation can be used to forecast future values. Both algorithms perform well when trend and seasonality are likely to explain most of the variance in the time series data. A disadvantage is that they aren't applicable in cold-start scenarios (forecasting with no historical data). ETS also gives more weight to the most recent history. So, if data patterns have recently changed, ETS may be more sensitive to those changes.
MVLR (Multi-variate linear regression) is a foundational statistical forecasting method. It trains a model using a historical dataset and establishes a linear relationship between the input features. The basic assumption in multivariate analysis is that time-dependent features not only depend on their historical values but also show a relationship between them. MVLR models can create fast and accurate forecast models based on features. They can also give insights on how and which drivers are most important. Under the hood, MVLR uses historical data, related data (optional), calendar data (optional), and synthetic data (automatically created by Forecaster, based on either historical or related data). Examples of synthetic data include trends such as exponential and linear, seasonality effects, as well as lagged values.
The Prophet is an algorithm based on an additive modeling procedure where non-linear trends are fit with yearly, weekly, and daily seasonality. It works best with time series with strong seasonal effects, and is compatible with holidays or other previously known important, but irregular events. An advantage is that it's suitable for "what-if" analysis. While Prophet supports a few missing observations or outliers, it isn't suitable for sparse datasets. Prophet can also provide insights on how and which drivers most impact forecast results. Under the hood, Prophet employs historical data, related data (optional), calendar (optional) and synthetic data (automatically created by Forecaster, based on either historical or related data). Examples of synthetic data include linear trends, seasonality effects, as well as lagged values.
DeepAR is a deep learning neural network algorithm. It works best with larger historical datasets containing hundreds of time series. DeepAR can incorporate related data and attributes across time series to identify underlying structures and similarities. Furthermore, DeepAR is suitable for advanced forecasting scenarios such as sparse datasets, "what-if" analyses, and cold-start scenarios.
LightGBM is an advanced machine learning model that uses gradient-boosting decision tree methods to generate forecast results. LightGBM performs well in most situations, including with large data sets and even when there's missing data. LightGBM can support related data line items and holiday calendar options. This algorithm also supports "what-if" analysis, since you can use related data line items to simulate future scenarios.
TimesFM is an advanced foundation model. It's pre-trained on large-scale real-world data, and can generate forecasts across varied data sets. It's an adaptable and efficient algorithm that can produce accurate forecasts with limited historical data.
You can choose a specific algorithm from the above, or use Ensemble. Ensemble automatically compares the performance of multiple algorithms (ETS, SARIMAX, MVLR, and Prophet) and applies the optimal algorithm for a given item based on your selected metric (MASE, MAPE, or RMSE). This algorithm maximizes forecast accuracy without the need to run multiple algorithms over the entire data set.
Incorporating related time series and holiday information
To make the most out of algorithms that support related data, it is recommended that you incorporate as many related time series as possible (up to the maximum limit). Consider if the related data adds information that is relevant for the forecast. For example, related data that correlate to historical data could lead to more accurate forecasts. However, keep in mind that related data time series that lack variability have little value and should not be included. When possible, select the built-in holiday calendar during Forecast Model creation to help improve accuracy.
Conclusion
Forecaster algorithms enable you to generate accurate forecasts. Algorithm performance depends on the specific use case, data set, and historical patterns. No single algorithm is better than another. A best practice is to compare the results of different algorithms and select the algorithm or combination that produces the most accurate results for your data.