Dataset Usage#

Univariate time series#

Detection, evaluation and visualization. Note that the gray line is the ground truth of anomalies.

from streamad.util import StreamGenerator, UnivariateDS, plot
from streamad.model import SpotDetector

ds = UnivariateDS()
stream = StreamGenerator(
model = SpotDetector()

scores = []

for x in stream.iter_item():
    score = model.fit_score(x)

data, label, date, features =, ds.label,, ds.features