Evaluation Tool for Time Series Anomaly Detection Methods
Project description
See TimeEval Algorithms for algorithms that are compatible to this tool.
The algorithms in that repository are containerized and can be executed using the DockerAdapter of TimeEval.
If you use TimeEval, please consider citing our paper.
📖 TimeEval's documentation is hosted at https://timeeval.readthedocs.io.
Features
- Large integrated benchmark dataset collection with more than 700 datasets
- Benchmark dataset interface to select datasets easily
- Adapter architecture for algorithm integration
- DockerAdapter
- JarAdapter
- DistributedAdapter
- MultivarAdapter
- ... (add your own adapter)
- Large collection of existing algorithm implementations (in TimeEval Algorithms repository)
- Automatic algorithm detection quality scoring using AUC (Area under the ROC curve, also c-statistic) or range-based metrics
- Automatic timing of the algorithm execution (differentiates pre-, main-, and post-processing)
- Distributed experiment execution
- Output and logfile tracking for subsequent inspection
Installation
TimeEval can be installed as a package or from source.
:warning: Attention!
Currently, TimeEval is tested only on Linux and macOS and relies on unixoid capabilities. On Windows, you can use TimeEval within WSL. If you want to use the provided detection algorithms, Docker is required.
Installation using pip
Builds of TimeEval are published to PyPI:
Prerequisites
-
python >= 3.9, < 3.13
:warning: Attention!
A dependency of TimeEval prevents us from supporting Python versions >= 3.13:
prtsis not updated and depends onNumPy<2.0.0. However, there is no NumPy version below2.0.0that supportsPython>=3.13. -
pip >= 20
-
Docker (for the anomaly detection algorithms)
-
(optional)
rsyncfor distributed TimeEval
Steps
You can use pip to install TimeEval from PyPI:
pip install TimeEval
Installation from source
tl;dr
git clone git@github.com:TimeEval/TimeEval.git
cd timeeval/
conda create -n timeeval python=3.9
conda activate timeeval
pip install .
Prerequisites
The following tools are required to install TimeEval from source:
- git
- Python > 3.9 and Pip (anaconda or miniconda is preferred)
Steps
-
Clone this repository using git and change into its root directory.
-
Create a conda-environment and install all required dependencies:
conda create -n timeeval python=3.9 conda activate timeeval pip install .
-
If you want to make changes to TimeEval or run the tests, you need to install the development dependencies with:
pip install ".[ci]". The optional extra dependencies".[dev]"contains additional dependencies for the notebooks and scripts packaged with TimeEval.
Usage
Example script:
from pathlib import Path
from typing import Dict, Any
import numpy as np
from timeeval import TimeEval, DatasetManager, Algorithm, TrainingType, InputDimensionality
from timeeval.adapters import FunctionAdapter
from timeeval.algorithms import subsequence_if
from timeeval.params import FixedParameters
# Load dataset metadata
dm = DatasetManager(Path("tests/example_data"), create_if_missing=False)
# Define algorithm
def my_algorithm(data: np.ndarray, args: Dict[str, Any]) -> np.ndarray:
score_value = args.get("score_value", 0)
return np.full_like(data, fill_value=score_value)
# Select datasets and algorithms
datasets = dm.select()
datasets = datasets[-1:]
# Add algorithms to evaluate...
algorithms = [
Algorithm(
name="MyAlgorithm",
main=FunctionAdapter(my_algorithm),
data_as_file=False,
training_type=TrainingType.UNSUPERVISED,
input_dimensionality=InputDimensionality.UNIVARIATE,
param_config=FixedParameters({"score_value": 1.})
),
subsequence_if(params=FixedParameters({"n_trees": 50}))
]
timeeval = TimeEval(dm, datasets, algorithms)
# execute evaluation
timeeval.run()
# retrieve results
print(timeeval.get_results())
Citation
If you use TimeEval in your project or research, please cite our demonstration paper:
Phillip Wenig, Sebastian Schmidl, and Thorsten Papenbrock. TimeEval: A Benchmarking Toolkit for Time Series Anomaly Detection Algorithms. PVLDB, 15(12): 3678 - 3681, 2022. doi:10.14778/3554821.3554873
@article{WenigEtAl2022TimeEval,
title = {TimeEval: {{A}} Benchmarking Toolkit for Time Series Anomaly Detection Algorithms},
author = {Wenig, Phillip and Schmidl, Sebastian and Papenbrock, Thorsten},
date = {2022},
journaltitle = {Proceedings of the {{VLDB Endowment}} ({{PVLDB}})},
volume = {15},
number = {12},
pages = {3678--3681},
doi = {10.14778/3554821.3554873}
}
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 timeeval-1.5.0.tar.gz.
File metadata
- Download URL: timeeval-1.5.0.tar.gz
- Upload date:
- Size: 165.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0906f1ab68fc62cce49d6f7e236575584b95dd642edd43554796e41ff04ddcea
|
|
| MD5 |
f18306756d7f44025ea9f337aa0e5b09
|
|
| BLAKE2b-256 |
9c279179dc5f704c04f9efa4de6a303aa4f774b760ebccb227f9dc24899ab0fc
|
Provenance
The following attestation bundles were made for timeeval-1.5.0.tar.gz:
Publisher:
build.yml on TimeEval/TimeEval
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
timeeval-1.5.0.tar.gz -
Subject digest:
0906f1ab68fc62cce49d6f7e236575584b95dd642edd43554796e41ff04ddcea - Sigstore transparency entry: 211393611
- Sigstore integration time:
-
Permalink:
TimeEval/TimeEval@02a497c0aa09502738c202b85e943baf3a702476 -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/TimeEval
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@02a497c0aa09502738c202b85e943baf3a702476 -
Trigger Event:
push
-
Statement type:
File details
Details for the file timeeval-1.5.0-py3-none-any.whl.
File metadata
- Download URL: timeeval-1.5.0-py3-none-any.whl
- Upload date:
- Size: 343.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea3ff75ad4264722d6189bbe7aa9298104ee6173b808dcc707a4767707c1ea5d
|
|
| MD5 |
0e2e994a9acaee9f82e89475fd23147a
|
|
| BLAKE2b-256 |
f030ac291734c572b4897d36542a9cde40c1c53509c994c0538a8974798a1025
|
Provenance
The following attestation bundles were made for timeeval-1.5.0-py3-none-any.whl:
Publisher:
build.yml on TimeEval/TimeEval
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
timeeval-1.5.0-py3-none-any.whl -
Subject digest:
ea3ff75ad4264722d6189bbe7aa9298104ee6173b808dcc707a4767707c1ea5d - Sigstore transparency entry: 211393616
- Sigstore integration time:
-
Permalink:
TimeEval/TimeEval@02a497c0aa09502738c202b85e943baf3a702476 -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/TimeEval
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@02a497c0aa09502738c202b85e943baf3a702476 -
Trigger Event:
push
-
Statement type: