Evaluating Classifiers: In-Class Exercises
Consider the table below, which reports, for eight instances, the actual class of each
instance and the score given by a perceptron to that instance.
Tnstance
Actual Class
Classifier Score
Negative
5
Positive
AS
Positive
05
Negative
Negative
Positive
Negative
Positive
FP
Ga
TN
FN
TW
1. Draw a confusion matrix for these results.
2. Calculate the Precision and Recall of these results
eu3, Create a ROC curve for these results:
For each value of the threshold, fil inthe table below with the accuracy, True Positive
Rate, and False Positive Rate of the classifier. (Ifthe score is equal to or greater than the
threshold, the classifier assigns “positive”, else it assigns “negative”.)
Recall that TPR=TP/P; FPR=FP/N
‘Accuracy True Positive Rate_| False Positive Rate
Sketch a ROC curve (True Positive Rate vs. False Positive Rate) with these six
thresholds.a
| | Pos | Ney |
| (eet ae EN |f
j TN |t
Formule
2) Preursio 2 = 0/5 = 50% 1PR- TE
y P
Recall < = = 0) 2:e OZ For - FP
je