Favicon of Darts

Darts

Python time series forecasting and anomaly detection library under Apache 2.0, with ARIMA, neural networks and GPU training through PyTorch Lightning.

Screenshot of Darts website

Darts is an open source Python library for data scientists and developers who need to forecast time series or detect unusual observations in their own Python environment. Its shared model interface lets you compare statistical methods such as ARIMA with neural networks such as N-BEATS without rewriting the surrounding forecasting workflow. It uses the Apache 2.0 license.

The library handles single-variable and multivariable series, and its machine learning models can learn across multiple series. Many models accept external information, including past observations, known future values and fixed attributes. Supported foundation models include Chronos-2 and TiRex, which can produce forecasts without task-specific training.

Backtesting measures how models would have performed on historical data, while ensembles combine their predictions. Probabilistic forecasts express uncertainty, and conformal prediction adds calibrated intervals to pretrained global models. Hierarchical reconciliation keeps forecasts consistent with totals and their component series.

For anomaly detection, Darts can compare forecasts with actual observations or apply PyOD detectors to time series. It also provides data transformations and forecast evaluation metrics. Deep learning models use PyTorch Lightning with GPU and TPU training support. Darts works with pandas, polars and NumPy data, integrates with MLflow for experiment tracking, and uses SHAP to explain some forecasting models.

Similar to Darts