A simple-to-use Python package for time series anomaly detection!
Project description
dtaianomaly
Time series anomaly detection
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:
- State-of-the-art time series anomaly detection via a simple API. Learn more!
- Develop custom models for anomaly detection. Learn more!
- 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_)
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dtaianomaly-0.5.1.tar.gz.
File metadata
- Download URL: dtaianomaly-0.5.1.tar.gz
- Upload date:
- Size: 136.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fc381d62ca4e5f5f9bd3452cffc6f28b3ad0e42e3933f011946535375e66a90
|
|
| MD5 |
0e34ed7e9e4aa6bf5f3316dd0b416427
|
|
| BLAKE2b-256 |
41d65542e50674835e45228005534f772aee495e447061f7f60d4f663e7551d3
|
Provenance
The following attestation bundles were made for dtaianomaly-0.5.1.tar.gz:
Publisher:
release-execute.yml on ML-KULeuven/dtaianomaly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dtaianomaly-0.5.1.tar.gz -
Subject digest:
0fc381d62ca4e5f5f9bd3452cffc6f28b3ad0e42e3933f011946535375e66a90 - Sigstore transparency entry: 681834650
- Sigstore integration time:
-
Permalink:
ML-KULeuven/dtaianomaly@5668a78991ba4dd6b5c847d2d8b32c357db4c9b4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ML-KULeuven
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-execute.yml@5668a78991ba4dd6b5c847d2d8b32c357db4c9b4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file dtaianomaly-0.5.1-py3-none-any.whl.
File metadata
- Download URL: dtaianomaly-0.5.1-py3-none-any.whl
- Upload date:
- Size: 208.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b54d2b544bb3f8da18b9a41e04ffa03e94354f3cabb3f43d9cc70339d9a8392f
|
|
| MD5 |
aac0b06d221e89fdb8090c47a35cae70
|
|
| BLAKE2b-256 |
cd66b2adeca502ce37ada75f2c8c337aed50ac3abfe906fd311ced7c0de84015
|
Provenance
The following attestation bundles were made for dtaianomaly-0.5.1-py3-none-any.whl:
Publisher:
release-execute.yml on ML-KULeuven/dtaianomaly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dtaianomaly-0.5.1-py3-none-any.whl -
Subject digest:
b54d2b544bb3f8da18b9a41e04ffa03e94354f3cabb3f43d9cc70339d9a8392f - Sigstore transparency entry: 681834656
- Sigstore integration time:
-
Permalink:
ML-KULeuven/dtaianomaly@5668a78991ba4dd6b5c847d2d8b32c357db4c9b4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ML-KULeuven
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-execute.yml@5668a78991ba4dd6b5c847d2d8b32c357db4c9b4 -
Trigger Event:
workflow_dispatch
-
Statement type: