Skip to content

TS Forecasting Methods

ML-TS: stationarity is defined three times (Cheatsheet "Basics", Cheatsheet #1, §3), forecasting methods are listed twice (Cheatsheet #5, §6), and windowing appears twice (Ebook 04, Géron 04).


Classical methods, from simplest to most complex. Always compare a model against the naive baselines first.

Method Forecast Notes
Naive Last observed value: \(\hat{y}_{t+h} = y_t\) Baseline. Optimal for a random walk
Seasonal naive Value from one season ago: \(\hat{y}_{t+h} = y_{t+h-m}\) Baseline for strongly seasonal data
Average / moving average Mean of all, or of the last k, observations Smooths noise, but lags behind a trend and doesn't anticipate seasonality
Exponential smoothing Weighted average with exponentially decaying weights (newest weighted most) Simple ES ≈ ARIMA(0,1,1). Holt adds a trend term; Holt–Winters adds seasonality
ARIMA / SARIMA Fitted AR and MA terms on the differenced series (+ seasonal terms) Requires TS-Stationarity after differencing
ML / DL (dense, RNN, LSTM) Learned from windowed (input → label) samples See TS-Windowing

h = forecast horizon, m = seasonal period.

Combining differencing and moving averages (Géron course)

A moving average alone can't anticipate trend or seasonality, so:

  1. Difference at the seasonal lag (e.g., \(y_t - y_{t-365}\)) to remove trend and seasonality.

  2. Forecast the differenced series with a trailing moving average.

  3. Add back the value from one season ago, ideally smoothed with a centered moving average to reduce noise.

Evaluating forecasts

  • Split by time, never randomly.

  • Fixed partitioning: one train / validation / test split along the time axis.

  • Roll-forward partitioning (= walk-forward validation): forecast the next period, add its actual values to the training history (refitting if needed), then forecast the following period. It mimics production but is slower.

  • Workflow: tune on train → validation. Estimate production performance on train + validation → test. For production, retrain on all the data.