API Reference / algorithms /

timeseries/

Time series analysis and forecasting algorithms.

Models for data where order matters and observations are not independent. Unlike the rest of algorithms, these learn from a sequence's own history rather than from a feature matrix.

Algorithms

  • AR: Autoregressive — the next value from its own past values.
  • MA: Moving average — the next value from past forecast errors.
  • ARMA: Autoregressive moving average, for stationary series.
  • ARIMA: ARMA plus differencing, for series with a trend.
  • ExponentialSmoothing: Weighted average with exponentially decaying
weights; handles level, trend and seasonality.
  • Prophet: Additive model with trend, seasonality and holiday terms.
  • SARIMAX: Seasonal ARIMA with exogenous regressors, estimated by exact
Gaussian maximum likelihood through a Kalman filter. Unlike ARIMA it really does fit the seasonal and moving-average terms, and it supports regressors and forecast intervals.
  • VAR: Vector autoregression — several series predicted jointly from the
lagged history of all of them.
  • ThetaForecaster: The Theta method; equivalent to simple exponential
smoothing with half the series' OLS drift, with optional deseasonalisation.
  • TBATS: Exponential smoothing with trigonometric seasonality, which is
what lets it handle high-frequency and non-integer seasonal periods (365.25) that seasonal ARIMA cannot.
  • CrostonForecaster: Intermittent demand — smooths demand sizes and
inter-arrival intervals separately.
  • STLDecomposition: Splits a series into trend, seasonal and residual
components.

Deep forecasting

deep holds NBEATSForecaster, NHITSForecaster and PatchTSTForecaster. They are native TuiML implementations, but they need a tensor library with autograd, so fitting one requires pip install 'tuiml[torch]'. Importing them never imports torch and constructing one never requires it — only fit does, and it raises a clear ImportError naming the install command.

Classification

classification is a separate task: it labels a whole series by its shape rather than forecasting its next value. See DTWNeighborsClassifier.

Notes

These subclass Regressor, not Classifier: forecasting predicts a continuous value. Ordinary cross-validation shuffles observations and leaks the future into the past, so evaluate with TimeSeriesSplit, which only ever trains on data preceding the test fold.

Packages


Modules