First time here? Checkout the FAQ!
x
+2 votes
4.3k views
asked in Machine Learning by (116k points)  

We have data on 1000 pieces of fruit. The fruit being a Banana, Orange or some Other fruit and imagine we know 3 features of each fruit, whether it’s long or not, sweet or not and yellow or not, as displayed in the table below:

A piece of an unknown fruit with these features are provided: Long, Sweet and Yellow. 

Calculate probability of each of these 3 classes based on Naive Bayes Classification algorithm and report the class.

  

1 Answer

0 votes
answered by (116k points)  
 
Best answer

You can see the step-by-step solution for this question here. The solution can include Laplace Smoothing as well, but the result will not change. For Laplace smoothing, 1 should be added to the numerator of probability and in the denominator, you should add the number of unique features (Long, Sweet, Yellow are unique features, therefore 3 should be added in the denominators).

commented by (280 points)  
How come we don't apply Laplace smoothing to this question? In this question, P(Orange | Long, Sweet, Yellow) = 0 since P(Long|Orange) = 0, so doesn't that mean we need to apply Laplace smoothing to not lose the affect of the probability of the rest of the features?
commented by (550 points)  
We can apply Laplace smoothing, still will not affect the result.... it will definitely affect if have  1 more feature which make Banana probability Zero... i.e. RED colour... in that case we dont have any other solution but to apply Laplace smoothing
...