Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Workflow:Rapidsai Cuml Time Series Forecasting

From Leeroopedia


Knowledge Sources
Domains Machine_Learning, Time_Series, Forecasting, GPU_Computing
Last Updated 2026-02-08 12:00 GMT

Overview

End-to-end process for GPU-accelerated time series forecasting using cuML's batched ARIMA, AutoARIMA, and Holt-Winters ExponentialSmoothing implementations.

Description

This workflow covers the standard procedure for forecasting time series data on NVIDIA GPUs using the RAPIDS cuML library. The key advantage of cuML's time series module is its batched architecture, which fits thousands of independent time series simultaneously on GPU in parallel. The workflow supports three methods: ARIMA/SARIMA for models with known parameters, AutoARIMA for automatic parameter selection via information criteria, and Holt-Winters ExponentialSmoothing for seasonal trend decomposition. All methods produce point forecasts and optional confidence intervals.

Usage

Execute this workflow when you have one or more time series that need forecasting and want GPU-accelerated fitting. This is particularly valuable when fitting thousands of time series simultaneously (e.g., demand forecasting across product lines, sensor telemetry prediction). Use ARIMA when the ARIMA order (p,d,q) is known from domain expertise. Use AutoARIMA when the optimal parameters are unknown and automatic selection is desired. Use Holt-Winters when the data exhibits clear trend and seasonal patterns.

Execution Steps

Step 1: Data Preparation

Organize time series data into columnar format where each column represents an independent time series. Data can be provided as cuDF DataFrames, CuPy arrays, or NumPy arrays. Ensure the series are equally spaced in time and handle any missing values. For ARIMA with exogenous variables, prepare the external regressor matrix separately.

Key considerations:

  • Each column is an independent time series for batched processing
  • cuML ARIMA processes all series in the batch with the same ARIMA order
  • AutoARIMA can assign different orders to different series within the batch
  • Data should be numeric (float32 or float64)

Step 2: Stationarity Assessment

Determine the appropriate differencing orders for ARIMA models. For manual ARIMA, use domain knowledge or the KPSS stationarity test from `cuml.tsa.stationarity` to decide the differencing order `d`. For seasonal data, also determine the seasonal differencing order `D`. AutoARIMA performs this step automatically using the KPSS test and a seasonality test.

Key considerations:

  • The KPSS test determines the regular differencing order `d`
  • A seasonality test (Wang-Smith-Hyndman) determines `D` for seasonal data
  • Over-differencing can introduce spurious patterns; start with minimal differencing
  • AutoARIMA automates this step completely

Step 3: Model Configuration

Configure the chosen forecasting model with appropriate parameters.

ARIMA: Specify the order tuple (p,d,q) for non-seasonal components and (P,D,Q,s) for seasonal components. Set `fit_intercept` for trend terms and `simple_differencing` for the differencing strategy.

AutoARIMA: Specify the search ranges for p, d, q, P, D, Q and the seasonal period s. Choose the information criterion (AIC, AICc, or BIC) for model selection and the fitting method (CSS, ML, or CSS-ML hybrid).

Holt-Winters: Specify the seasonal period, trend type (additive or multiplicative), and seasonal type.

Step 4: Model Fitting

Fit the model to the training data. For ARIMA, this optimizes model parameters using a batched L-BFGS-B optimizer that maximizes the log-likelihood via a Kalman filter. For AutoARIMA, this first searches the parameter space by fitting candidate models and selecting the best via information criteria, then refits the selected models. For Holt-Winters, this optimizes smoothing parameters.

Key considerations:

  • ARIMA fitting methods: `"css"` (fast, approximate), `"ml"` (slow, accurate), `"css-ml"` (hybrid)
  • `maxiter` controls the L-BFGS-B optimization iterations (default: 1000)
  • AutoARIMA's `search()` must be called before `fit()` to select model orders
  • GPU batched fitting processes all series simultaneously for maximum throughput

Step 5: Forecasting

Generate future predictions using `forecast()` for out-of-sample predictions or `predict()` for both in-sample and out-of-sample ranges. Optionally compute confidence intervals by specifying a `level` parameter. For models with exogenous variables, provide future exogenous values.

Key considerations:

  • `forecast(nsteps)` is a convenience wrapper for `predict(n_obs, n_obs + nsteps)`
  • Confidence intervals are based on the estimated error variance
  • AutoARIMA's `forecast()` aggregates results from all internal ARIMA models
  • Results maintain the original series ordering for batched operations

Step 6: Model Diagnostics

Examine fitted model parameters and diagnostics. Access AR/MA coefficients, seasonal coefficients, the intercept term, and error variance. For AutoARIMA, inspect which orders were selected for each series. Evaluate forecast accuracy by comparing predictions against held-out data.

What happens:

  • `ar_`, `ma_`, `sar_`, `sma_`: AR and MA coefficient arrays
  • `mu_`: Intercept term
  • `sigma2_`: Error variance estimate
  • `niter`: Number of optimization iterations to convergence
  • AutoARIMA exposes the selected orders for each series in the batch

Execution Diagram

GitHub URL

Workflow Repository