Naïve Bayes classification algorithm:
Naïve Bayes classification algorithm works on conditional probability based on Bayes theorem. Mostly it is used for text classification. For example, email spam filtering, sentiment analysis, weather prediction, news classification, medical diagnosis etc.
Bayes theorem:
Bayes theorem helps in determining the occurrence of an event based on the events which has already occurred or prior events.
P(A/B) =(P(B/A). P(A))/P(B)
P(A/B) =Conditional probability of A given B
P(B/A) = Conditional probability of B given A
P(A)= Probability of A occurring
P(B)= Probability of B occurring
Types of Naïve Bayes algorithm:
a) Gaussian
Gaussian distribution is used to classify continuous values where the features are assumed to follow normal or Gaussian distribution.
b) Multinomial
Multinomial classifier classifies the document based on the frequency of particular words which occurs in the document. For example, it classifies the document to sports, education or politics category.
c) Bernoulli
Bernoulli classifier also used in document classification, but here the feature vectors are Boolean or zeros or ones. It means whether particular word is present in the document or not.
0 Comments