Question
Consider a dataset for binary classification problem with class labels . The features are given by and . Each of these features have 2 values as given below. Apply Naive Bayes classifier by computing the probabilities to classify the example: .
Solution
==================================================================================================
We know that,
Let’s find the conditional probabilities of given that the class is .
Let’s find the conditional probabilities of given that the class is .
According to Naive Bayes Classification Rule:
In order to classify the given example, we need to find the probability that if falls in either class.
Probability that is in:
Thus, it is equally probable that the given sample falls in either class or .