Back to models
Forecaster

ARARForecaster

Categorical in XPred intPred int insample

ARAR (AutoRegressive-AutoRegressive) forecaster.

ARAR is a forecasting method that combines memory-shortening with subset autoregression. The method first applies a memory-shortening transformation to reduce long-term dependencies in the series, then fits a parsimonious autoregressive model using a subset of lags.

The algorithm proceeds in two stages:

  1. Memory-shortening: Applies up to 3 rounds of filtering to reduce long-memory effects in the time series

  2. Subset AR: Selects an optimal subset of 3 lags from the shortened series using a grid search over possible lag combinations

The ARAR model is a forecasting method designed for time series that may exhibit long-memory or persistent dependence. It works by automatically shortening the memory in the data and then fitting a small subset autoregressive (AR) model to the transformed series.

Mathematical details follow about the two main stages of the ARAR algorithm:

Stage 1: Memory Shortening (Adaptive AR Filter)

The algorithm tests for long-memory structure by examining delayed correlations.

  • If long memory is detected, it applies a simple AR filter at the best delay.

  • This step may repeat up to three times, composing a filter

    \(\Psi(B) = 1 + \Psi_1 B + \cdots + \Psi_k B^k\)

    until the transformed series behaves like a short-memory process.

Stage 2: Subset AR Modeling

After memory shortening, ARAR fits a 4-term subset AR model using Yule-Walker equations. It searches over candidate lag sets and selects the model with the smallest estimated noise variance. The resulting AR polynomial

\(\phi(B) = 1 - \phi_1 B - \phi_{l_1} B^{l_1} - \phi_{l_2} B^{l_2} - \phi_{l_3} B^{l_3}\) # noqa: E501

combines with the memory-shortening filter to produce the full ARAR kernel

\(\xi(B) = \Psi(B)\,\phi(B)\).

This approach allows ARAR to automatically adapt to persistent dynamics while remaining computationally efficient. It often performs well on seasonal or slowly decaying series where pure ARMA or exponential-smoothing models struggle.

Quickstart

python
from sktime.forecasting.arar import ARARForecaster

estimator = ARARForecaster(max_ar_depth=None, max_lag=None, safe=True)

Parameters(3)

max_ar_depthint or None, default=None

Maximum AR lag to consider in subset selection. If None, defaults to:

  • 26 if n > 40

  • 13 if 13 <= n <= 40

  • max(4, ceil(n/3)) if n < 13

max_lagint or None, default=None

Maximum lag for computing autocovariances. If None, defaults to:

  • 40 if n > 40

  • 13 if 13 <= n <= 40

  • max(4, ceil(n/2)) if n < 13

safebool, default=True
Whether to use safe fitting mode. * If True, returns a simple mean-based fallback model when fitting fails. * If False, raises an exception on failure.

Examples

>>> from sktime.datasets import load_airline
>>> from sktime.forecasting.arar import ARARForecaster
>>> y = load_airline ()
>>> forecaster = ARARForecaster ()
>>> forecaster. fit (y) ARARForecaster(
... )
>>> y_pred = forecaster. predict (fh = [1, 2, 3 ]) Prediction intervals and coefficients:
>>> from sktime.split import temporal_train_test_split
>>> from sktime.utils.plotting import plot_series
>>> 
>>> # Load and split data
>>> y = load_airline()
>>> y_train, y_test = temporal_train_test_split(y, test_size=12)
>>> 
>>> # Fit and predict
>>> forecaster = ARARForecaster()
>>> forecaster.fit(y_train) ARARForecaster(…)
>>> y_pred = forecaster.predict(fh=list(range(1, 13)))
>>> pred_int = forecaster.predict_interval(fh=list(range(1, 13)))
>>> 
>>> # Plot results
>>> plot_series(… y_train, y_test, y_pred, labels=[“Train”, “Test”, “Forecast”], … title= “Forecast from Arar”, … pred_int=pred_int …) # doctest: +SKIP
>>> 
>>> # Print model information
>>> print(f”Selected AR lags: {forecaster.model_[2]}”) # doctest: +SKIP
>>> print(f”AR coefficients: {forecaster.model_[1]}”) # doctest: +SKIP
>>> print(f”Innovation variance: {forecaster.model_[3]:.4f}”) # doctest: +SKIP

References

[1]

Brockwell, Peter J, and Richard A. Davis.

Introduction to Time Series and Forecasting (2016), Chapter 10.