Catalog PyPI
PACKAGE EXPLORERView in registry

ads-evt

PyPI

Anomaly Detection in Streams with Extreme Value Theory

Versions collected1
Direct dependencies4From release 0.0.4
Last observed20 Oct, 19:53 UTC

README

Version 0.0.4 documentation

Anomaly Detection in Streams with Extreme Value Theory

Code style: black GitHub Actions Test Coverage PyPI version Downloads

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.416 Oct 20224

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
limjcst/ads-evt

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:53 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:c2543e1fe92ab2bbacfceece4553fe5f8cde841374cf740e65ea180f583312f8