Anomaly Detection in Streams with Extreme Value Theory
This repository wraps the original implementation of SPOT published in KDD'17 as an installable package.
We refactor the original one, removing duplicated code.
To verify the faithfulness, several test cases are introduced in tests/test_faithfulness.py.
Usage
Install this package via pip install ads-evt.
ads_evt has almost the same interface as the original implementation.
from typing import List
import matplotlib.pyplot as plt
import numpy as np
import ads_evt as spot
# physics.dat is a file in the original repository
with open("physics.dat", encoding="UTF-8") as obj:
data = np.array(list(map(float, obj.read().split(","))))
init_data = 2000
proba = 1e-3
depth = 450
models: List[spot.SPOTBase] = [
# spot.SPOT(q=proba),
# spot.dSPOT(q=proba, depth=depth),
# spot.biSPOT(q=proba),
# The original implementation of bidSPOT uses n_points=8 for _grimshaw by default
spot.bidSPOT(q=proba, depth=depth, n_points=8),
]
for alg in models:
alg.fit(init_data=init_data, data=data)
alg.initialize()
results = alg.run()
# Plot
figs = alg.plot(results)
plt.show()
For developers
Execute test cases with the following commands
# Install dependencies for development
git submodule update --init
python -m pip install -r requirements-dev.txt
# Execute test cases
coverage run
coverage report
Licences
GNU GPLv3
Metadata
Release files for ads-evt 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 |
|---|---|---|---|---|
| ads-evt-0.0.4.tar.gz | 8.7 kB | Without provenance | Details for ads-evt-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ads_evt-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for ads_evt-0.0.4-py3-none-any.whl |
Total release size: 16.4 kB
Release files / ads-evt-0.0.4.tar.gz
| Download URL | ads-evt-0.0.4.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9528bcee794861c3a0ebedfeeb06a29cff85baa71b37d082c208c9d13a02cf2d
|
|
BLAKE2b-256 checksum How to use checksums |
40f4a8b083b79a36f54469e8c28527e3c09dca3884500256309a484afd09f154
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / ads_evt-0.0.4-py3-none-any.whl
| Download URL | ads_evt-0.0.4-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
706094a3d60eaf933c4161dfe4e71f99ddc79818df439daa09a0b793cd9ec69f
|
|
BLAKE2b-256 checksum How to use checksums |
67fb0702555dfa0f9dde41a0ff2b8e669e8a5468c64c0c507837204a39672979
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for ads-evt 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.