CapyMOA bayesian wrappers.
Incremental Bayesian learners backed by CapyMOA/MOA. Registered under
capymoa. hub keys, mirroring the native TuiML bayesian family.Classes
Incremental Naive Bayes classifier (hub key capymoa.NaiveBayes).
Wraps
NaiveBayes. Maintains per-class feature statistics that are updated one instance at a time, so the model can be trained on data that does not fit in memory and keeps learning as new instances arrive.
Constructor
__init__( self, )
Attributes
schema_
capymoa.stream.Schema
Stream schema derived from the training data.
learner_
capymoa.classifier.NaiveBayes
The fitted backing CapyMOA learner.
Notes
Requires the optional CapyMOA extra:
pip install 'tuiml[capymoa]'. A good first baseline for streaming classification: fast, single-pass, and surprisingly robust under gradual concept drift.See Also
python
>>> from tuiml.capymoa import NaiveBayes
>>> from tuiml.datasets.generators import Agrawal
>>> data = Agrawal(n_samples=1000, function=1, random_state=42).generate()
>>> model = NaiveBayes().fit(data.X, data.y)
>>> model.predict(data.X[:5]).shape
(5,)