his assignment you will train a Nave Bayes classifier on categorical data and predict individuals incomes. Import the nbtrain.csv file. Use the first 9010 records as training data and the remaining 1000 records as testing data. Read the nbtrain.csv file into the R environment. Construct the Nave Bayes classifier from the training data, according to the formula income ~ age + sex + educ. To do this, use the naiveBayes function from the e1071 package. Provide the models a priori and conditional probabilities. Score the model with the testing data and create the models confusion matrix. Also, calculate the overall, 10-50K, 50-80K, and GT 80K misclassification rates. Explain the variation in the models predictive power across income classes. Use the first 9010 records as training data and the remaining 1000 records as testing data. What is propose of separating the data into a training set and testing set? Construct the classifier according to the formula sex ~ age + educ + income, and calculate the overall, female, and male misclassification rates. Explain the misclassification rates? Divide the training data into two partitions, according to sex, and randomly select 3500 records from each partition. Reconstruct the model from part (a) from these 7000 records. Provide the models a priori and conditional probabilities. How well does the model classify the testing data? Explain why. Repeat step (b) 4 several times. What effect does the random selection of records have on the models performance? What conclusions can one draw from this exercise?
his assignment you will train
Pssst…We can write an original essay just for you.
Any essay type. Any subject. We will even overcome a 6 hour deadline.
<< SAVE15 >>
Place your first order with code to get 15% discount right away!