Skip to content

shenxiangzhuang/pysesd

Repository files navigation

[Py]S-ESD

Seasonal Extreme Studentized Deviate(S-ESD) in Python.

About

Seasonal Extreme Studentized Deviate(S-ESD) in Python.

Installation

Get latest version from PyPI:

pip install pysesd

Getting started

Simple example

from pysesd.dataset import load_synthetic_ts
from pysesd.sesd import SESD

ts = load_synthetic_ts()
sesd = SESD(alpha=0.05, hybrid=False, max_outliers=2)
outliers = sesd.fit(ts)
sesd.plot(save=True, fig_dir="../figures", fig_name="simple.png")

Twitter example

from pysesd.dataset import load_twitter_ts
from pysesd.sesd import SESD

ts = load_twitter_ts()
sesd = SESD(alpha=0.05, hybrid=True, max_outliers=int(len(ts) * 0.02))
outliers = sesd.fit(ts)
sesd.plot(save=True, fig_dir="../figures", fig_name="twitter.png")

References