Skip to main content

Parametric event detection & inference library

Project description

evDetect

Parametric event detection & inference library


What is evDetect?

evDetect is a minimal python library for:

  1. Automatic detection of events (e.g. spikes) in any metric
  2. Parametric modeling of these events as an exponential decay process while accounting for trends
  3. Reporting of detected event with metrics like amplitude and half-life.

The underlying assumption is that every event can be approximated by an exponential decay process:

$$y=Ae^{(-\lambda t)}$$

Because the library has to scan through every time period and tune the optimal parameter $\lambda$ we have included the functionality for multiprocessing to accelerate the computation time.

Install

pip install evdetect

How to use

Code Example

from evdetect.evdetector import Detector
from evdetect.gen_data import Scenario

s = Scenario()
d=Detector()
d.fit(s.data)
print(d.summary())
d.predict()
d.plot()

Summary Example

{
    'detected': True, 
    'event_time': 200.0, 
    'event_halflife': 1.7, 
    'decay_lambda': 0.4, 
    'amplitude': 6.32, 
    'trend': 0.01, 
    'rsquared': 0.95
}

Charts Examples

No trend and infinite half-life event Example1

Trend with non infinite half-life event Example2

For parallel processing use fit(...,parallel=True)

For more examples see the tutorial in the notebooks folder.

Author

Nick Gavriil

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evdetect-0.1.5.tar.gz (8.0 kB view details)

Uploaded Source

File details

Details for the file evdetect-0.1.5.tar.gz.

File metadata

  • Download URL: evdetect-0.1.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for evdetect-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5b593f3840fa7353042cd5d7610daa9b890f8776f43f3ca71cfa496d67b8bdf1
MD5 d21045a56a7d5268cd507e499104b4a4
BLAKE2b-256 132781ffe6e1088a08b758bd72438b4da91ec4eb96f515758d1393726e9f8584

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page