Multivariate detector#

xStream Detector#

from streamad.util import StreamGenerator, MultivariateDS, plot
from streamad.model import xStreamDetector

ds = MultivariateDS()
stream = StreamGenerator(ds.data)
model = xStreamDetector()
scores = []

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

data, label, date, features = ds.data, ds.label, ds.date, ds.features
plot(data=data,scores=scores,date=date,features=features,label=label)

Rshash Detector#

from streamad.util import StreamGenerator, MultivariateDS, plot
from streamad.model import RShashDetector

ds = MultivariateDS()
stream = StreamGenerator(ds.data)
model = RShashDetector()
scores = []

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

data, label, date, features = ds.data, ds.label, ds.date, ds.features
plot(data=data,scores=scores,date=date,features=features,label=label)

Half Space Tree Detector#

from streamad.util import StreamGenerator, MultivariateDS, plot
from streamad.model import HSTreeDetector

ds = MultivariateDS()
stream = StreamGenerator(ds.data)
model = HSTreeDetector()
scores = []

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

data, label, date, features = ds.data, ds.label, ds.date, ds.features
plot(data=data,scores=scores,date=date,features=features,label=label)

LODA Detector#

from streamad.util import StreamGenerator, MultivariateDS, plot
from streamad.model import LodaDetector

ds = MultivariateDS()
stream = StreamGenerator(ds.data)
model = LodaDetector()
scores = []

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

data, label, date, features = ds.data, ds.label, ds.date, ds.features
plot(data=data,scores=scores,date=date,features=features,label=label)

One Class SVM Detector#

from streamad.util import StreamGenerator, MultivariateDS, plot
from streamad.model import OCSVMDetector

ds = MultivariateDS()
stream = StreamGenerator(ds.data)
model = OCSVMDetector()
scores = []

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

data, label, date, features = ds.data, ds.label, ds.date, ds.features
plot(data=data,scores=scores,date=date,features=features,label=label)