Skip to main content

Measures from confusion matrix (152, 130)

Short answer

Accuracy 78.2%, error rate 21.8%, sensitivity/recall/TPR 53.9%, specificity/TNR 87.7%, precision/PPV 63.3%, NPV 82.9%, FPR 12.3%, FNR 46.1%.

Given the following confusion matrix, determine Accuracy, Error rate, Sensitivity, Specificity, Precision, Recall, Positive Predictive Value and Negative Predictive Value, TPR, TNR, FPR, FNR of the classifier model.

Actual \ Predicted+ ve- ve
+ ve152130
- ve88630

Taking "+ve" as the positive class (rows are actual, columns are predicted):

TP = 152, FN = 130, FP = 88, TN = 630. Total = 152 + 130 + 88 + 630 = 1000. Actual positives P = 282, actual negatives N = 718. Predicted positives = 240, predicted negatives = 760.

MeasureFormulaCalculationValue
Accuracy(TP + TN)/total(152 + 630)/1000 = 782/10000.782 (78.2%)
Error rate(FP + FN)/total218/10000.218 (21.8%)
Sensitivity = Recall = TPRTP/(TP + FN)152/2820.539
Specificity = TNRTN/(TN + FP)630/7180.877
Precision = PPVTP/(TP + FP)152/2400.633
NPVTN/(TN + FN)630/7600.829
FPRFP/(FP + TN)88/7180.123
FNRFN/(FN + TP)130/2820.461

Checks: TPR + FNR = 1 and TNR + FPR = 1; error rate = 1 − accuracy.

The F₁ score = 2·0.633·0.539/(0.633 + 0.539) = 0.582.

Answer: accuracy 78.2%, error rate 21.8%, sensitivity = recall = TPR = 53.9%, specificity = TNR = 87.7%, precision = PPV = 63.3%, NPV = 82.9%, FPR = 12.3%, FNR = 46.1%. The classifier finds only about half of the positive cases.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Data Mining chapter 3 questions →