Principle:Rapidsai Cuml Time Series Forecasting
Overview
Time series forecasting uses historical temporal observations to predict future values by decomposing a series into level, trend, and seasonal components and fitting parametric models that capture autoregressive and moving-average dynamics.
Description
Time series forecasting addresses the fundamental problem of predicting future observations based on sequentially ordered historical data. Two major families of methods dominate classical time series forecasting:
Exponential Smoothing (Holt-Winters): This method decomposes a time series into three components: level (the baseline value), trend (the rate of increase or decrease), and seasonality (recurring periodic patterns). The Holt-Winters method supports both additive seasonality (where seasonal effects are constant in magnitude) and multiplicative seasonality (where seasonal effects scale proportionally with the level). The model is parameterized by three smoothing constants (alpha, beta, gamma) that control how much weight is given to recent versus historical observations for each component. These parameters are optimized using the L-BFGS quasi-Newton method, which efficiently finds the parameter values that minimize the forecast error.
ARIMA (AutoRegressive Integrated Moving Average): ARIMA models capture temporal dependencies through three mechanisms: autoregression (AR) on past values, differencing (I) for stationarity, and moving average (MA) on past forecast errors. Seasonal ARIMA (SARIMA) extends this with seasonal counterparts parameterized by the order tuple (p, d, q)(P, D, Q, s), where p/P are AR orders, d/D are differencing orders, q/Q are MA orders, and s is the seasonal period. The model fitting uses a Kalman filter for likelihood evaluation combined with L-BFGS optimization in a batched fashion to fit multiple independent series simultaneously.
Stationarity Testing: Before fitting ARIMA models, it is necessary to determine the appropriate differencing orders (d, D). The KPSS (Kwiatkowski-Phillips-Schmidt-Shin) test is used to assess whether a series is stationary around a deterministic trend. The test null hypothesis is stationarity, so rejection indicates the need for further differencing.
Synthetic ARIMA Data: For testing and validation, synthetic time series following a known ARIMA process can be generated with specified orders, scale, noise level, and intercept.
Usage
Time series forecasting is the right choice when:
- Data is temporally ordered with regular intervals (e.g., daily sales, monthly temperatures, hourly sensor readings).
- The goal is to project future values beyond the observed range.
- Holt-Winters is preferred for series with clear trend and seasonality patterns and when interpretability of components is valued.
- ARIMA is preferred when autocorrelation structure is complex or when the practitioner needs fine control over the model order.
- Batched forecasting is needed when many independent time series (e.g., per-product, per-sensor) must be forecast simultaneously on GPU.
Theoretical Basis
Holt-Winters Additive Update Equations:
where is the level, is the trend, is the seasonal component, is the seasonal period, and are the smoothing parameters.
ARIMA(p,d,q) Model:
where is the backshift operator, is the AR polynomial, is the MA polynomial, and .
L-BFGS Optimization:
The smoothing parameters and ARIMA coefficients are estimated by minimizing the negative log-likelihood. L-BFGS approximates the inverse Hessian using a limited history of gradient differences, with a line search procedure controlled by the Armijo condition for step size selection. The optimization terminates when the parameter difference, error difference, or gradient norm falls below specified thresholds.
KPSS Test Statistic:
where is the partial sum of regression residuals, and is a long-run variance estimator.