Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 26, 2026·3 min de lecture

Darts — User-Friendly Time Series Forecasting and Anomaly Detection

A Python library for easy manipulation and forecasting of time series, supporting both classical statistical models and modern deep learning architectures with a unified API.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Darts Overview
Commande d'installation directe
npx -y tokrepo@latest install 9fc23920-890f-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Darts is an open-source Python library developed by Unit8 that makes time series forecasting accessible to both beginners and experts. It wraps a wide range of models — from ARIMA and exponential smoothing to N-BEATS and Temporal Fusion Transformer — behind a consistent, easy-to-use API centered around its own TimeSeries data structure.

What Darts Does

  • Provides a unified fit()/predict() interface across 30+ forecasting models
  • Supports probabilistic forecasting with confidence intervals and quantile predictions
  • Handles multivariate, multi-step, and hierarchical time series natively
  • Includes built-in anomaly detection and scoring modules
  • Offers data preprocessing utilities for scaling, missing value handling, and feature engineering

Architecture Overview

Darts is built around the TimeSeries class, an immutable wrapper over xarray that stores time-indexed data with optional static covariates. Models inherit from base classes (LocalForecastingModel, GlobalForecastingModel) that define the training interface. Deep learning models use PyTorch Lightning under the hood, enabling GPU training, early stopping, and learning rate scheduling out of the box.

Self-Hosting & Configuration

  • Install via pip install darts or pip install "u8darts[all]" for all optional dependencies
  • Use darts[torch] to include PyTorch-based models only
  • Configure deep learning models with pl_trainer_kwargs for PyTorch Lightning options
  • Set num_loader_workers for parallel data loading during training
  • Export trained models with model.save() and reload with Model.load()

Key Features

  • Consistent API across statistical, machine learning, and deep learning models
  • First-class support for covariates (past and future external variables)
  • Backtesting and evaluation with historical_forecasts() and multiple metrics
  • Ensemble models and pipeline composition for stacking approaches
  • Rich plotting utilities built on matplotlib

Comparison with Similar Tools

  • sktime — Broader ML task coverage; Darts focuses on making forecasting simple
  • statsmodels — Lower-level statistical API; Darts wraps statsmodels with a friendlier interface
  • GluonTS — AWS probabilistic forecasting; Darts is framework-agnostic and easier to start
  • Prophet — Single model optimized for business series; Darts offers 30+ model choices
  • NeuralForecast — Pure neural focus; Darts mixes classical and deep models

FAQ

Q: Can Darts handle multiple time series at once? A: Yes. Global models in Darts can be trained on multiple series simultaneously and transfer learned patterns across them.

Q: Does Darts support GPU training? A: Yes. All deep learning models leverage PyTorch Lightning and can be trained on GPUs by passing appropriate trainer kwargs.

Q: What data formats does Darts accept? A: Darts accepts pandas DataFrames, NumPy arrays, or its native TimeSeries objects.

Q: Is Darts suitable for production use? A: Yes. Models can be serialized, and the library supports reproducible pipelines suitable for deployment.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.