O'Reilly logo

Mastering Python for Data Science by Samir Madhavan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The naive Bayes classifier

The naive Bayes classifier is a simple probabilistic classifier, which is based on the Bayes theorem. The assumption made is that there is strong interdependence between the features, because of which it is called naive. The following is the Bayes theorem:

The naive Bayes classifier

Here in the preceding formula, A and B are events, P(A) and P(B) are the probabilities of A and B and are interdependent of each other. P(A|B) is the probability of A, given that B is True, which is a conditional probability. P(B|A) is the probability of B, given that A is True. The naive Bayes formula is as follows:

Let's try solving this equation to understand the naive ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required