hummingbird.ml.operator_converters.sklearn.nb

Converters for scikit-learn Naive Bayes models: BernoulliNB, GaussianNB, MultinomialNB

hummingbird.ml.operator_converters.sklearn.nb.convert_sklearn_bernouli_naive_bayes(operator, device, extra_config)[source]

Converter for sklearn.naive_bayes.BernoulliNB

Args:

operator: An operator wrapping a sklearn.naive_bayes.BernoulliNB model device: String defining the type of device the converted operator should be run on extra_config: Extra configuration used to select the best conversion strategy

Returns:

A PyTorch model

hummingbird.ml.operator_converters.sklearn.nb.convert_sklearn_gaussian_naive_bayes(operator, device, extra_config)[source]

Converter for sklearn.naive_bayes.GaussianNB

Args:

operator: An operator wrapping a sklearn.naive_bayes.GaussianNB model device: String defining the type of device the converted operator should be run on extra_config: Extra configuration used to select the best conversion strategy

Returns:

A PyTorch model

hummingbird.ml.operator_converters.sklearn.nb.convert_sklearn_multinomial_naive_bayes(operator, device, extra_config)[source]

Converter for sklearn.naive_bayes.MultinomialNB

Args:

operator: An operator wrapping a sklearn.naive_bayes.MultinomialNB model device: String defining the type of device the converted operator should be run on extra_config: Extra configuration used to select the best conversion strategy

Returns:

A PyTorch model