Naive Bayes Theorem
Table of contents
Pros: The theorem is very crucial for computationally intensive problems, handling missing data or irrelevant features
Cons: As the algorithm assumes that the feature or relation between variables are independent it sometimes cause inaccuracy as in real world there might be a relation among them!
Bayes theorem:
The algorithm is based on Bayes theorem,which is basically a probabilistic approach to a certinity. Confusing? Okay here you go...
Suppose you sit on a chair and a dinning table in front of you,you asked your imaginary friend to throw a ball beneath the table but you don't know at which position. You asked your friend to throw again and asked him this time is it right or left to the previous position of the ball? And as much as you repeat the process you'll become more accurate about the position of the ball thrown at first time...this is the underlying concept of Bayes theorem.
Theorem itself: The theorem calculates the probability of an event (A) given evidence (B) by multiplying the prior probability of the event by the likelihood of the evidence given the event, and dividing the result by the prior probability of the evidence.The theorem can be expressed mathematically as:
P(A|B) = (P(B|A) * P(A) ) / P(B)
where:
P(A|B) is the conditional probability of event A given event B has occurred.
P(B|A) is the conditional probability of event B given event A has occurred.
P(A) is the prior probability of event A.
P(B) is the prior probability of event B.
denominator is the probability of the event which has already happened(B).
So,based on this Bayes theorem , Naive Bayes theorem was implemented which just assumes that there's no relationship amoung the variables where in Bayes Theorem it derived from two events depending on each other.
Note: I've also added an image containing a problem of Bayes theorem to understand it more clearly if you're not already.
Subscribe to my newsletter
Read articles from Md.Anisur Rahman directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Md.Anisur Rahman
Md.Anisur Rahman
I am Tanim ,a Graduate from Bangladesh. area of interest are machine learning, artificial intelligence,Datascience & web development