# Question

In this lesson we use `scikit-learn`’s `MultinomialNB` class to implement a naive Bayes classifier. What is multinomial naive Bayes? Why isn’t the class simply called `NaiveBayes`?

The word multinomial in `MultinomialNB` refers to the probability distribution underlying our application. To be more explicit, remember that we must have an idea of how the probabilities for our application are computed (whether everything is equally likely, a uniform distribution, or our data is normally distributed, or something else).

Naive Bayes does not tell us how to choose this underlying distribution; it provides us with an equation to use once we have worked out how to compute the probabilities. So naive Bayes is a very general term and we could use different classes based on the different distributions we decide are appropriate for our application. For example, `sklearn.naive_bayes` provides the following variants of naive Bayes, where the difference is in the underlying probability distribution

• `BernoulliNB`
• `GaussianNB`
• `MultinomialNB`
• `ComplementNB`

This is why we don’t simply call the class `NaiveBayes` – the underlying distribution is important.

11 Likes

The `predict_proba()` method gives us the probabilities of the datapoint having either label. In practice (as in, how it’s done in industry or in academic research) would we incorporate something like an ‘ambiguous’ label if neither probability meets a confidence threshold?

Yes I think that it would be so. We can easily implement it using if statements

yes, you could do something like:

``````probabilities = classifier.predict_proba(review_counts)
if((probabilities[0][0] - probabilities[0][1]) < .1):
print("Difference is less than 10%, so take it with a grain of salt")
``````
1 Like