EMMV
Implementation of EM/MV metrics based on N. Goix et al.
This is a means of evaluating anomaly detection models without anomaly labels
Installation
pip install emmv
Example Use
from emmv import emmv_scores
test_scores = emmv_scores(model, features)
- Where 'model' is your trained scikit-learn, PyOD, or PyCaret model
- Where 'features' is a 2D DataFrame of features (the X matrix)
Example resulting object:
{
"em": 0.77586,
"mv": 0.25367
}
If you are using models without a built-in decision_function (e.g. Keras or ADTK models), then you need to specify an anomaly scoring function. Please see examples in the examples folder.
Running Examples
pip install .
python ./examples/sklearn_example.py
Interpreting scores
- The best model should have the highest Excess Mass score
- The best model should have the lowest Mass Volume score
- Probably easiest to just use one of the metrics
- Extreme values are possible
Contact
Please feel free to get in touch at christian.oleary@mtu.ie
Citation
@Misc{emmv,
author = {Christian O'Leary},
title = {EMMV library},
howpublished = {\url{https://pypi.org/project/emmv/}},
year = {2021--2021}
}
Metadata
Release files for emmv 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| emmv-0.0.4.tar.gz | 3.6 kB | Without provenance | Details for emmv-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| emmv-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for emmv-0.0.4-py3-none-any.whl |
Total release size: 7.6 kB
Release files / emmv-0.0.4.tar.gz
| Download URL | emmv-0.0.4.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
464e1c41613364400f586dc89cd1f97e3a8f4d22f7cd78bdba6a6f5a98739ab7
|
|
BLAKE2b-256 checksum How to use checksums |
371f2e9f578680b98196e3aef716e78a63e66cc4b9f39c32563afa7effadce35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.6
|
Release files / emmv-0.0.4-py3-none-any.whl
| Download URL | emmv-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33d1f28b2db8bf6e74dc7a0e6a000926f4ce53f9a1e0df7a5d8eceba01c889b3
|
|
BLAKE2b-256 checksum How to use checksums |
a3a2158beee1f8ad2e2bc7283271f55129e63039efe12bc8e86939ffd0c6bbcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.6
|
Security for emmv 0.0.4
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.