Skip to main content

dtaianomaly

Time series anomaly detection

Unit tests Doctest docs-stable docs-latest PyPi Version Downloads PyPI pyversions PyPI license Code style: black InTimeAD UI

A simple-to-use Python package for the development and analysis of time series anomaly detection techniques. Here we describe the main usage of dtaianomaly, but be sure to check out the documentation for more information.

Installation

The preferred way to install dtaianomaly is via PyPi. See the documentation for more options.

pip install dtaianomaly

Features

The three key features of dtaianomaly are as follows:

  1. State-of-the-art time series anomaly detection via a simple API. Learn more!
  2. Develop custom models for anomaly detection. Learn more!
  3. Quantitative evaluation of time series anomaly detection. Learn more!

Example

Below code shows a simple example of dtaianomaly, which is part of the anomaly detection notebook. More examples are provided in the other notebooks and in the documentation.

from dtaianomaly.data import demonstration_time_series
from dtaianomaly.preprocessing import MovingAverage
from dtaianomaly.anomaly_detection import MatrixProfileDetector

# Load the data
X, y = demonstration_time_series()

# Preprocess the data using a moving average
preprocessor = MovingAverage(window_size=10)
X_, _ = preprocessor.fit_transform(X)

# Fit the matrix profile detector on the processed data
detector = MatrixProfileDetector(window_size=100)
detector.fit(X_)

# Compute either the decision scores, specific to the detector, or the anomaly probabilities
decision_scores = detector.decision_function(X_)
anomaly_probabilities = detector.predict_proba(X_)

Demonstration-time-series-detected-anomalies.svg

Acknowledgments

If you find dtaianomaly useful for your work, we would appreciate the following citation:

@article{carpentier2025dtaianomaly,
      title={{dtaianomaly: A Python library for time series anomaly detection}}, 
      author={Louis Carpentier and Nick Seeuws and Wannes Meert and Mathias Verbeke},
      year={2025},
      eprint={2502.14381},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2502.14381}, 
}

Carpentier, L., Seeuws, N., Meert, W., Verbeke, M.: dtaianomaly: A Python library for time series anomaly detection (2025), https://arxiv.org/abs/2502.14381

Contribute

The goal of dtaianomaly is to be community-driven. All types of contributions are welcome. This includes code, but also bug reports, improvements to the documentation, additional tests and more. Check out the documentation to find more information about how you can contribute!

License

Copyright (c) 2023-2025 KU Leuven, DTAI Research Group

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Metadata

Release files for dtaianomaly 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dtaianomaly 0.5.1
File Size Uploaded Provenance Actions
dtaianomaly-0.5.1.tar.gz 136.0 kB With provenance Details for dtaianomaly-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dtaianomaly 0.5.1
File Interpreter ABI Platform Actions
dtaianomaly-0.5.1-py3-none-any.whl Python 3 none any Details for dtaianomaly-0.5.1-py3-none-any.whl

Total release size: 344.3 kB

Release files / dtaianomaly-0.5.1.tar.gz

Download URL dtaianomaly-0.5.1.tar.gz
Size 136.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0fc381d62ca4e5f5f9bd3452cffc6f28b3ad0e42e3933f011946535375e66a90
BLAKE2b-256 checksum
How to use checksums
41d65542e50674835e45228005534f772aee495e447061f7f60d4f663e7551d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2025.

Transparency log

Release files / dtaianomaly-0.5.1-py3-none-any.whl

Download URL dtaianomaly-0.5.1-py3-none-any.whl
Size 208.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b54d2b544bb3f8da18b9a41e04ffa03e94354f3cabb3f43d9cc70339d9a8392f
BLAKE2b-256 checksum
How to use checksums
cd66b2adeca502ce37ada75f2c8c337aed50ac3abfe906fd311ced7c0de84015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2025.

Transparency log

Security for dtaianomaly 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dtaianomaly-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page