Starting from:

$25

CSCI5260- Lab 9: Naïve Bayesian Inference Solved

Lab 9 – Naïve Bayesian Inference

Overview
Creating a predictive model is a very common activity in artificial intelligence. In this lab, you apply Naïve Bayes inference to the Kaggle adult Data Set, which asks you to predict whether income exceeds $50,000 per year based on census data. 

Step 1 – Download Files

Download the lab9.py file and the adults.csv file from D2L and place them in the same folder.

The lab9.py file uses the following libraries:

numpy
pandas
pyplot as plt # for data visualizations
naive_bayes.GaussianNB
seaborn
warnings
Run the lab9.py program to ensure all of the libraries work, and the program loads the CSV file correctly. Others may be added along the way, but this will get you started. Step 2 – Tutorial

Complete the remainder of the tutorial on the following site, beginning with Step 7 and STOP at the end of Step 15:

https://www.kaggle.com/prashant111/naive-bayes-classifier-in-python Step 3 – Questions
Answer the following questions in Lab9.docx.

Explain why feature engineering was necessary in this problem.
Explain why feature scaling was necessary in this problem.
Does this model have a good accuracy? Why or why not?
Speculate about ways to improve the accuracy of the prediction.
Given these results, and referring to this problem specifically, explain why some use the term “idiot Bayes.”

More products