Machine Learning for Forecasting: Size Matters

Vitor Cerqueira18 Apr 2022

Problem

Analysts who forecast demand, load or business metrics must pick between classical models (ARIMA, exponential smoothing) and machine learning regressors. Published benchmarks disagree. One large study found that classical methods beat machine learning on univariate series, and many learners lost even to a seasonal naive forecast. A later demand-forecasting study by the same group found the opposite. Most of the learners tested in the first study failed even to beat a seasonal naive model.

Example from the article: the first study used over 1000 series with an average of only 118 observations each, while most series in the second study had more than 280.

Solution in brief

The length of the training history decides which family wins. Plot the error of both families against training sample size on your own series. Short history favors classical models and long history favors machine learning.

Questions this case answers
  • How to decide between a low-parameter statistical model and a data-hungry learning model when the amount of history per series varies from tens to thousands of observations
  • How to choose between classical statistical models and machine learning models for forecasting a time series?
  • How to find how many observations of history a forecasting model needs before machine learning beats ARIMA or exponential smoothing?
  • How to check whether published benchmarks showing that classical methods win apply to my series length?

Tools and methods

  • ARIMA, ETS, TBATS, Theta, seasonal naive — classical baselines
  • Gaussian Processes, M5, LASSO, Random Forests, MARS — machine learning candidates, fitted on lagged values
  • Cross-validation over a growing training set — builds the error-versus-sample-size curve
  • Hybrid of exponential smoothing and a neural network — M4 winner's design for long series
Continue reading — it's free

Google or a one-time email code. No password.