Time-series forecasting & anomaly detection · one TimeSeries object, many models · verified against Darts 0.3x (2026)

Darts cheat sheet

Darts (unit8) makes forecasting feel like scikit-learn: every model — from ExponentialSmoothing to deep nets like TFTModel and NHiTSModel — consumes and produces a single TimeSeries object and shares a fit/predict API. It handles multivariate & multiple series, past/future/static covariates, probabilistic forecasts, and honest backtesting out of the box. This sheet targets Darts 0.3x.

TimeSeries models & forecast global / DL models covariates probabilistic & preprocessing backtest / gotcha most common

Verified 2026-08-24 against the official docs at unit8co.github.io/darts and the unit8co/darts repo. Deep-learning models are built on PyTorch Lightning; install the torch extra for them.

Outline

Everything is a TimeSeries. Learn to build one, then fit/predict is the same for every model — local, global, or deep.

Data

  1. 1 · Install & TimeSeries
  2. 2 · TimeSeries operations

Forecast

  1. 3 · fit / predict & local models
  2. 4 · Global & deep models

Enrich

  1. 5 · Covariates
  2. 6 · Scaling & pipelines
  3. 7 · Probabilistic forecasts

Validate

  1. 8 · Backtesting & metrics
  2. 9 · Grid search & anomaly
  3. 10 · Gotchas
  4. Worth memorizing

The TimeSeries Object

Everything in Darts flows through it.

1Install & TimeSeries0.3x
2TimeSeries operationsslice & combine

Forecast

Same two calls for every model in the library.

3fit / predict & local modelsclassic
4Global & deep modelstrain on many series

Enrich

Covariates, scaling, and uncertainty.

5Covariatesextra signals
6Scaling & pipelinespreprocess
7Probabilistic forecastsuncertainty

Validate

Backtest with rolling origins, tune, and detect anomalies.

8Backtesting & metricshonest evaluation
9Grid search & anomaly detectionextras
!Common gotchasread before shipping

Worth memorizing

everything is a TimeSeriesmodels consume & produce TimeSeries; from_dataframe is the entry point
fit(series) → predict(n)same two calls for ETS, ARIMA, LightGBM, TFT, NHiTS...
global models train on a listfit([ts1, ts2, ...]) then predict any series — one model, thousands of series
input/output_chunk_lengthtorch models' lookback & horizon windows
past vs future covariatesfuture ones must extend beyond the target by n steps
Scaler + inverse_transformneural models need scaled inputs; don't forget to invert
num_samples for uncertaintyprobabilistic models sample paths; extract quantiles
historical_forecasts / backtestrolling-origin evaluation with retrain control
LightGBMModel(lags=...)the fast, strong tabular baseline