NO.PZ2023040502000080
问题如下:
After running his model on the test set, Quinn
produces a confusion matrix for evaluating the performance of the model
(Exhibit 3). He reminds Wu that since the number of defaults in the
dataset is likely much smaller than the number of non-defaults, this needs to
be considered in evaluating model performance.
Using Exhibit 3 and Quinn’s reminder, the most appropriate measure of the accuracy
of the model is:
选项:
A.
0.79
B.
0.86
C.
0.92
解释:
B is correct.
Quinn reminds Wu that there are likely unequal class distributions in the
dataset, making F1, the harmonic mean of precision and recall, a better measure
of accuracy.
Precision, P, measures what
proportion of positive identifications were actually correct, where
ü
P = (TP)/(TP + FP), TP = True
positives, and FP = False positives.
ü
P = (TP)/(TP + FP) =
118/(118 + 32) = 0.7866 = 0.79.
Recall, R, measures what
proportion of actual positives were identified correctly, where
ü
R = (TP)/(TP + FN) and FN =
False negatives.
ü
R = (TP)/(TP + FN) =
118/(118 + 8) = 0.9365 = 0.94.
F1 is the harmonic mean of
precision and recall and is equal to (2×P×R)/(P + R).
ü
F1 = (2×P×R)/(P + R) = (2×0.79×0.94)/(0.79 + 0.94) = 0.86.
A is incorrect.
Calculating precision results in 0.79: P = (TP)/(TP + FP) = 118/(118 + 32)
= 0.79.
C is incorrect.
Accuracy is the percentage of correctly predicted classes out of all
predictions:
A = (TP + TN)/(TP + FP + TN +
FN) = (118 + 320)/(118 + 32 + 320 + 8) = 0.92.
When the class distributions in
the dataset are unequal, as Wu indicates, F1 is a better measure of the
accuracy of the model.
怎么看出来不是求准确率?