AnomalyBench¶
Anomaly detection algorithms, benchmark dataset loaders, and a command line interface for comparing detectors on standard datasets under one reproducible protocol.
The distinguishing feature is not the detector library — PyOD already does
that well, and several detectors here are adapters over it. It is that every
comparison runs under the same evaluation contract: labels canonicalised to
1 = anomaly, scores put on a common orientation before ranking, and a
manifest recording exactly what produced each number.
Install¶
The base install covers classical detectors, ARIMA forecasting, graph detectors, the CLI, and the benchmark workflows. Deep learning, streaming, and Prophet stacks are optional extras.
A first benchmark¶
The seed annotation appears only for detectors that accept one, and iris is a
classification dataset pressed into service as an anomaly benchmark — the point
of the example is the mechanics, not the scores.
Or from Python:
from anomalybench.analytics.detectors import get_detector_class
detector = get_detector_class("isolation_forest")()
detector.fit(X_train)
scores = detector.score(X_test)
What to read next¶
- Detectors — the lifecycle every detector follows, what is available, and why score orientation matters.
- Running benchmarks — the CLI, YAML configuration, run manifests, and leaderboards.
- Metrics — which metrics are supported and how scores are made comparable across detectors.
- Exceptions — the structured error hierarchy, and
what changed for callers who used to catch
ValueError.
Citing¶
Cite the concept DOI to refer to the software generally, or the version DOI of the release you actually ran:
Machine-readable metadata lives in CITATION.cff and .zenodo.json. For a
result you intend to publish, cite the version DOI and keep the run manifest —
together they pin the code and the configuration that produced it.