Naive Bayes classifier is a machine learning algorithm based on Bayes Theorem. Bayes theorem is based on conditional probability.

## What is a classifier?

A classifier is a machine learning algorithm that is used to discriminate different classes based on certain features. Classifiers are used to study categorical variable.

## Bayes Theorem:

Bayes theorem is the main formula which is used in Naive Bayes classifier to create machine learning model. Bayes theorem is used to calculate posterior probability.

Using Bayes theorem, we can find the probability of **A** – Hypothesis, given the condition or evidence **B** as follows.

Bayes theorem states that posterior probability equals prior probability times the likelihood ratio.

## Why it is called Naive?

Bayes theorem assumes that the predictors or the features used for the classification are independent. That is the presence of one particular feature does not affect the other. Hence it is called naive.