Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 [33 Points]: See the attached housing data (Asssignment2 NB Data.xlsx). Each tab in the Excel file contains training and test splits. Your goal is
1 [33 Points]: See the attached housing data (Asssignment2 NB Data.xlsx). Each tab in the Excel file contains training and test splits. Your goal is to construct a Na ve Bayes classifier for this data. 1. Compute and show the conditional probability distribution for each feature. Explain how you got these values and show your work. Note: You are expected to do this part of the question by hand. Explain how you got the probability distribution for at least two features in detail. 2. Using your conditional probability table, write a Python code that will compute the probabilities for each example in the test data. Your program should output the proba- bilities of each class as well as the final classification based on the MAP rule. Note: You should hard-code the conditional probabilities from the previous step into your code. 3. Analyze the performance of the code using different metrics (accuracy, precision, recall, etc.) and briefly discuss your insights about the performance of the approach (good or bad) and the merits of using one metric over the other. You can use plots and other mechanisms to support your conclusions
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started