sklearn_pmml_model.naive_bayes#

The sklearn_pmml_model.naive_bayes module implements Naive Bayes algorithms. These are supervised learning methods based on applying Bayes’ theorem with strong (naive) feature independence assumptions.

Submodules#

Package Contents#

Classes#

PMMLGaussianNB

Gaussian Naive Bayes classifier.

class sklearn_pmml_model.naive_bayes.PMMLGaussianNB(pmml)#

Bases: sklearn_pmml_model.base.OneHotEncodingMixin, sklearn_pmml_model.base.PMMLBaseClassifier, sklearn.naive_bayes.GaussianNB

Gaussian Naive Bayes classifier.

Can perform online updates to model parameters via partial_fit(). For details on algorithm used to update feature means and variance online, see Stanford CS tech report STAN-CS-79-773 by Chan, Golub, and LeVeque:

Parameters:
pmmlstr, object

Filename or file object containing PMML data.

Notes

Specification: http://dmg.org/pmml/v4-3/NaiveBayes.html

_get_target_values(inputs, target)#
fit(x, y)#

Not supported: PMML models are already fitted.

_more_tags()#