# Manually solve the questions below by using the Nave Bayes Classifier: We conducted a survey to collect people's daily diets

## Question:

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 __Y__es, or __N__o. 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)

**Related Book For**

## Business Analytics Communicating With Numbers

ISBN: 9781260785005

1st Edition

Authors: Sanjiv Jaggia, Alison Kelly, Kevin Lertwachara, Leida Chen

**View Solution**

**Cannot find your solution?**

**Question Details**

**9**- Supervised Data Mining: k-Nearest Neighbors and Naïve Bayes

**Posted Date:**September 07, 2023 03:30:32