SETAR-Tree: a novel and accurate tree algorithm for global time series forecasting

Rakshitha Godahewa, Geoffrey I. Webb, Daniel F. Schmidt, Christoph Bergmeir

Abstract

Global Forecasting Models (GFMs) have become the state-of-the-art approach for large-scale time series forecasting, yet they often rely on general-purpose machine learning tools like LightGBM or XGBoost. These tools, while powerful, are not inherently designed for time series and often require significant hyperparameter optimization. This paper introduces SETAR-Tree, a novel forecasting-specific tree algorithm that incorporates Self-Exciting Threshold Autoregressive (SETAR) logic. By fitting pooled linear regression models at leaf nodes and employing statistical linearity tests for tree growth, SETAR-Tree achieves superior accuracy with minimal manual intervention.

Introduction

In recent years, the forecasting community has moved toward "Global Forecasting Models" (GFMs)—models trained across thousands of different but related time series. While general-purpose tree-based tools like LightGBM and XGBoost are frequently used, they are essentially "black boxes" that predict a constant average value at each leaf node. To achieve high performance, practitioners must spend significant time tuning hyperparameters like tree depth and learning rates. SETAR-Tree addresses this by providing a forecasting-specific architecture that understands the underlying linear structures of time series and can "self-tune" its own complexity.

Methodology

SETAR-Tree and its ensemble version, SETAR-Forest, combine the structural logic of decision trees with the mathematical rigor of Threshold Autoregressive (TAR) models.

Core Components

  • SETAR Logic: The tree splits data based on an "optimal lag" and a "threshold," effectively identifying different regimes within the data.
  • Linear Leaf Nodes: Unlike standard regression trees that calculate a simple average, SETAR-Tree fits a Pooled Regression (PR) model—a global linear autoregressive model—at every leaf. This allows the model to capture local linearities directly.
  • Statistical Stopping: To avoid overfitting without manual tuning, the algorithm uses a statistical linearity test (F-test). If a node doesn't show significant non-linearity or if splitting doesn't reduce error by at least 3%, the tree stops growing.

Data Representation

The model operates on a global scale by processing multiple time series simultaneously. Data is structured into a supervised learning format where lagged values (e.g., L1 to L5) serve as features for a target variable (y).

Data structure for global forecasting models using lagged values

Experimental Evaluation

The models were evaluated on eight diverse datasets, including real-world benchmarks like Rossmann Sales, the M5 (Walmart) dataset, and Kaggle Wikipedia Web Traffic, as well as simulated chaotic datasets like Mackey-Glass to test non-linear dynamics handling.

Key Results and Insights

  • Superior Accuracy: SETAR-Forest and SETAR-Tree significantly outperformed state-of-the-art tree algorithms (LightGBM, XGBoost, CatBoost) and traditional statistical benchmarks (ARIMA, ETS) across four different error metrics.
  • Statistical Significance: In a Friedman rank-sum test across all series, SETAR-Forest was identified as the top-performing "control" method, indicating that its performance gains are statistically robust across diverse data types.
  • The Power of Linear Leaves: Fitting a line (regression) at the leaf level is consistently more effective than fitting a point (average) for time series data. This prevents the "staircase" effect seen in standard regression trees.
  • Minimal Tuning: Because the tree uses statistical tests to determine its own depth, it provides competitive results "out of the box," making it ideal for automated forecasting pipelines.

Conclusion

SETAR-Tree represents a significant step forward in bridging classical statistical modeling with modern global forecasting techniques. By replacing constant leaf predictions with linear models and utilizing statistical stopping criteria, it offers a more robust and less labor-intensive alternative to general-purpose machine learning tools. Future work will explore multi-regime splits and the integration of SETAR-Trees into gradient boosting frameworks.

Summary updated

BibTeX
@article{godahewa2023setar,
  author = {Rakshitha Godahewa and Geoffrey I. Webb and Daniel F. Schmidt and Christoph Bergmeir},
  title = {{SETAR-Tree: a novel and accurate tree algorithm for global time series forecasting}},
  journal = {Machine Learning},
  year = {2023},
  doi = {10.1007/s10994-023-06316-x},
}
Figure