Problem Description:
Reuse the Car Evaluation Data Set used in assignment 3 (CarData.csv) for this lab.
First, modify the data set so that it becomes a binary
classification problem by treating the target EVALUATION values
very good (vgood), good (good) and acceptable (acc) as TRUE,
and the value unacceptable (unacc) as FALSE.
If you want to access readily made data, here is
the modified Car Evaluation
Data set.
Second, build a Naive Bayes Classifier whose output values represent the probability of each data object's EVALUATION value to be TRUE. This output probability should be a real number between 0 and 1. The sum of the TRUE probability and the FALSE probability should be 1.
Use the following function to make prediction when a Threshold is selected:
Prediction = "TRUE" if SCORE >= Threshold Prediction = "FALSE" if SCORE < Threshold
Draw the confusion matrix for Threshold = 0.5, and calculate the True Positive Rate, True Negative Rate, False Positive Rate, False Negative Rate, the precision and the recall.
Repeat the above task for Threshold = 0.15, 0.3, 0.6, 0.75 and 0.9 respectively.
Optionally draw the ROC curve for your predictive model based on the above exercise.