Have you ever wondered :
How your suspected/ marketing emails are automatically put in the junk / spam box and not the primary inbox?
How we can predict if today it will rain or not ?
If you have these questions, then just go through the article and you will be able to get a fair idea how these predictions are made which is very useful in day to day life.
In real life we all face circumstances where based on certain conditions and prior knowledge we want to predict happening of a certain event, for eg. I am a cricket fan, based on today’s weather conditions like temperature and humidity levels and prior knowledge of rains happening in these conditions I would like to calculate probability if we will have a match or not, based on that I would like to place my bets :D
With this article I will try to de-mystify how a Naive Bayes Classifier works. We will proceed as :
Let’s go through an example to have a clear picture.
Problem:
A purse contains 4,5 and 3 coins of denominations of Rs. 2,5 and 10 respectively. Two coins are drawn without replacing the first drawn coin . Find P( drawing Rs.2, then Rs.2)
Solution:
There are four Rs 2 coins and in total we have 12 coins so
P(Rs.2 coin in first draw) = 4/12 i.e. 1/3
The result of the first draw affected the probability of the second draw as after the first draw we are left with 3 coins of Rs.2 and in total now we have 11 coins.
P(Rs.2 coin for second draw) = 3/11
Finally P(drawing Rs. 2, then Rs 2 ) = (4/12)*(3/11) = 1/11
#predictions #data-science #towards-data-science #naive-bayes-classifier #data analysis