机器学习 - Confusion Matrix
Actual Value | |||
---|---|---|---|
Positive | Negative | ||
Predicted Value | Predicted Positive | True positive (TP) | False positive (FP) |
Predicted Negative | False negative (FN) | True negative (TN) |
TP: hit
TN: correct rejection
FP: false alarm, Type I error
FN: miss, Type II error
相关计算:
accuracy (ACC)
ACC = (TP + TN) / (TP + TN + FP + FN)
sensitivity, recall, hit rate or true positive rate (TPR)
TPR = TP / (TP + FN)
miss rate or false negative rate (FNR)
FNR = FN / (TP + FN) = 1 - TPR
specificity, selectivity or true negative rate (TNR)
TNR = TN / (TN + FP)
fall-out or false positive rate (FPR)
FPR = FP / (TN + FP) = 1 - TNR
precision or positive prediction value (PPV)
PPV = TP / (TP + FP)
false discovery rate (FDR)
FDR = FP / (TP + FP) = 1 - PPV
negative prediction value (NPV)
NPV = TN / (TN + FN)
false omission rate (FOR)
FOR = FN / (TN + FN) = 1 - NPV
F1 score
harmonic mean of precision and sensitivity
F1 = 2 * (PPV * TPR) / (PPV + TPR) = 2TP / (2TP + FP + FN)