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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.