Naive Bayes Classifier
Naive Bayes Classifier is a classification algorithm that uses the Bayes theorem for classification. It gives very good results when it comes to NLP tasks such as sentimental analysis. It is a fast and uncomplicated classification algorithm. This algorithm is quite popular to be used in NLP.
To understand the Naive Bayes Classifier, we need to understand the Bayes theorem.
Bayes Theorem
Bayes Theorem is a principled way of calculating a conditional probability. Conditional probability is the probability that something will happen, given that something else has already occurred. By using conditional probability, we can find out the probability of an event will occur given the knowledge of the previous event.
- P(A|B) — is the probability of A given that B has already happened.
- P(B|A) — is the probability of B given that A has already happened.
- P(A) — is the unconditional probability of A occurring.
- P(B) — is the unconditional probability of B occurring.
Naive Bayes Classifier
Naive bayes is a supervised learning algorithm for classification so the task is to find the class of observation (data point) given the values of features. Naive bayes classifier calculates the probability of…