Question: Manually solve the questions below by using the Nave Bayes Classifier: We conducted a survey to collect people's daily diets and try to build a
Manually solve the questions below by using the Naïve Bayes Classifier:
We conducted a survey to collect people's daily diets and try to build a model to predict whether their diets result in healthy conditions or not. The final results could be Yes, or No. Note: using green rows as training, and orange rows as testing.
| Breakfast | Lunch | Dinner | Healthy? |
| Ham | Carnivorous | Beef | Y |
| Milk | Carnivorous | Beef | N |
| Bread | Veggie | Pork | N |
| Bread | Veggie | Veggie | Y |
| Ham | Veggie | Veggie | Y |
| Milk | Carnivorous | Pork | N |
| Bread | Carnivorous | Beef | N |
| Ham | Veggie | Pork | Y |
| Milk | Veggie | Pork | Y |
| Milk | Carnivorous | Veggie | N |
| Noddle | Carnivorous | Pork | ? |
1). [5 points] What is Laplace smoothing? And why do we need it in the Naïve Bayesian classifier?
2). [15 points] Using the Categorical Naive Bayesian Classification to make predictions on the test sets, present confusion matrix, and calculate accuracy, precision, recall, F1 measure, and specificity, by considering Y as a positive label
3). [20 points] Using the Categorical Naive Bayesian Classification to make predictions on the unseen data (note: building the model by using both the green and orange rows, and predicting the label for unseen data/last row)
Step by Step Solution
There are 3 Steps involved in it
To solve these questions well go step by step 1 What is Laplace smoothing and why do we need it in the Nave Bayesian classifier Laplace smoothing also known as addone smoothing or Lidstone smoothing i... View full answer
Get step-by-step solutions from verified subject matter experts
