Skip to content

maki-nage/rxsci-river

Repository files navigation

RxSci-River

Github WorkFlows Documentation

RxSci operators for Scikit River.

Get Started

Evaluate and train a Hoeffding Tree Classifier from a stream of events:

import rx
import rxsci_river as rsr
from river import synth
from river.tree import HoeffdingTreeClassifier

gen = synth.Agrawal(classification_function=0, seed=42)
rx.from_(gen.take(1000)).pipe(
    rsr.evaluate.prequential(
        model=HoeffdingTreeClassifier(
            grace_period=100,
            split_confidence=1e-5,
            nominal_attributes=['elevel', 'car', 'zipcode'],
        ),
        pretrain_size=100),
).subscribe(
    on_next=print,
)

See the Maki Nage documentation for more information.

Installation

RxSci River is available on PyPi and can be installed with pip:

python3 -m pip install rxsci-river