MultinomialNB
Naive Bayes classifier for multinomial models.
Multinomial Naive Bayes model learns from occurrences between features such as word counts and discrete classes. The input vector must contain positive values, such as counts or TF-IDF values.
Parameters
-
n_classes(
int
) → The number of classes for the classifier. -
alpha(Default:
1.0
) → Additive (Laplace/Lidstone) smoothing parameter (use 0 for no smoothing).
Example Usage
We can create an instance and deploy Multinomial NB model like this.
import turboml as tb
model = tb.MultinomialNB(n_classes=2)