Categories Machine Learning

Naive Bayes Classifier

Part 2: Learning Machine Learning/Deep Learning

Not a member? Read it for free here.

If you are not aware on what is machine learning or want to brush up your basics, please refer this article first: Understanding the divide Machine Learning vs Deep Learning.

What is Naive Bayes Classifier?

Naive Bayes is a classification algorithm which comes under supervised learning which uses probability to predict which category a data point belongs to.

As the name suggests, it uses Bayes Theorem to classify data based on probability of different classes such that the features of data are given.

What is Bayes Theorem?

Bayes theorem says that the probability of occurrence of an event is based on already occurred previous event.

Where:

  • P(Y∣X): Posterior probability, probability of class Y given features X
  • P(X∣Y): Likelihood, probability of features X given class Y
  • P(Y): Prior probability of class Y
  • P(X): Marginal likelihood or evidence

Why the name Naive Bayes?

It is named as Naive because of the following assumptions:

  1. Independence of features: no feature is dependent on the other feature. In other words, the presence of one feature should not…