explaingit

unit8co/darts

9,372PythonAudience · dataComplexity · 3/5Setup · moderate

TLDR

A Python library for forecasting future values and spotting unusual data points in any time-ordered sequence, from monthly sales to hourly sensor readings, using a single consistent fit/predict interface across dozens of models.

Mindmap

mindmap
  root((Darts))
    Forecasting
      ARIMA
      Exponential smoothing
      N-BEATS deep learning
      Probabilistic output
    Anomaly detection
      Score each point
      Flag outliers
      Multi-variable series
    Interface
      fit and predict
      scikit-learn style
    Setup
      Python 3.10 plus
      pip install
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Forecast next quarter's sales figures using ARIMA or a deep learning model without changing your code.

USE CASE 2

Detect anomalies in server metrics or sensor readings using the built-in anomaly detection module.

USE CASE 3

Produce probabilistic forecasts with confidence intervals for demand planning or financial projections.

Tech stack

Pythonpip

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Python 3.10 or newer, deep learning model extras add heavier dependencies.

License terms not stated in the explanation.

In plain English

Darts is a Python library for forecasting and anomaly detection on time series data. A time series is any sequence of values recorded over time, such as monthly sales figures, hourly temperature readings, or daily website visits. Darts makes working with this kind of data more approachable by giving all of its forecasting models the same simple interface: you call fit() to train a model on historical data, and predict() to generate future values, the same pattern used by scikit-learn, a popular general-purpose machine learning toolkit. The library covers a wide range of forecasting approaches in one place. On the simpler end are classical statistical methods like ARIMA and exponential smoothing, which have been used for decades. On the more complex end are deep learning models including N-BEATS and others that can detect patterns across large datasets. Because all models share the same interface, you can swap one out for another without changing much code. The library also supports probabilistic forecasting, meaning instead of a single predicted value it can produce a range of possible outcomes with associated likelihoods. Anomaly detection is a separate but integrated capability. The darts.ad module lets you build pipelines that score how unusual each point in a series is, then classify points as normal or anomalous. You can feed in results from forecasting models or use external anomaly scoring tools. Both single-variable and multi-variable series are supported throughout the library. Installing Darts requires Python 3.10 or newer. The basic install is a single pip command. Optional extras add support for additional model types that have heavier dependencies, so you can keep the install lightweight if you only need the simpler models. The project is maintained by Unit8, a data and AI consulting company. Full documentation including a quickstart guide, user guide, API reference, and worked examples is available on the project website. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Using Darts, load monthly sales data, fit an N-BEATS model, and plot a 12-month forecast with 80% confidence intervals.
Prompt 2
I have hourly CPU usage data. Show me how to use darts.ad to score each data point for anomalies and flag anything more than 2 standard deviations from the predicted value.
Prompt 3
Write a Darts script that trains both ARIMA and ExponentialSmoothing on my time series, computes the MAPE for each on a held-out test set, and prints the winner.
Open on GitHub → Explain another repo

← unit8co on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.