Interactive demo · Probabilistic Machine Learning: Advanced Topics · Chapter 29

Structural time series: trend, season and forecast

Monthly CO2 at Mauna Loa is modelled as a sum of a local linear trend (level μt and slope δt, both random walks) and a seasonal pattern with period 12, plus observation noise. This is a linear-Gaussian state-space model with 13 state variables, so the Kalman filter gives the exact likelihood and forecasts. The four noise standard deviations are the only parameters: set them with the sliders and watch how the log-likelihood, the forecast of the last ten years (held out) and the learned components respond. The best setting is the maximum-likelihood one in preset 1.

View

Noise standard deviations (log10 scale)

Try these

The training data end 120 months before the end of the record; the forecast is p(yt+h | y1:t) rolled forward from the last filtered state (29.150), and its band is ± 2 predictive standard deviations. The record is the 1958–2001 monthly CO2 series (a stand-in for the 1966–2019 record in the book).

In the lecture notes