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 ...

Get Mastering Python for Data Science now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.