This repository provides implementations of anomaly detection approaches as scikit-learn estimators. For the neural network-based models, PyTorch is also used. All implement the abstract classes BaseEstimator and OutlierMixin. The following methods acc. to the scikit-learn API are supported:
- fit
- predict
- fit_predict
- score_samples
- decision_function
- score
For more information, please refer to the scikit-learn documentation.
cd <path-to-anomaly_detection-directory>
conda env create --file anomaly_detection.yml
conda activate anomaly_detection
# test installation
python -m pytest
Approach | Estimator | Reference |
---|---|---|
Mahalanobis distance | MahalanobisDistanceAnomalyDetector | |
Euclidean distance | EuclideanDistanceAnomalyDetector | |
Chi-Squared distance | ChiSquaredDistanceAnomalyDetector | |
DeepSVDD | DeepSVDDAnomalyDetector | Ruff, L. et al. Deep one-class classification |
Autoencoder | AEAnomalyDetector | |
VAE | VAEAnomalyDetector | Kingma, D. P. & Welling, M. Auto-encoding variational bayes |
GANomaly | GANomalyAnomalyDetector | Akcay, S., Atapour-Abarghouei, A. & Breckon, T. P. Ganomaly: Semi-supervised anomaly detection via adversarial training |
For running experiments on any dataset, please refer to the scikit-learn documentation.
MIT