混淆矩阵(confusion matrix)(也称误差矩阵)是一种特殊的, 具有两个维度的(实际和预测)列联表(contingency table),并且两维度中都有着一样的类别的集合。
实际的类别 | |||||
Total =P + N | 正例 positive (P) | 负例 negative(N) | Prevalence = P / Total | 精确度 Accuracy = (TP + TN) / Total | |
预测的类别 | 预测正例 | 真阳性(TP) true positive | 假阳性(FP) false positive | 精度 Precision PPV= TP / (TP + FP) | False discovery rate FDR = FP / (FP+TP) |
预测负例 | 假阴性(FN) false negative | 真阴性(TN) true negative | 错误遗漏率 False omission rate FOR = FN / (FN+TN) | Negative predictive value NPV = TN / (TN+FN) | |
召回率 Recall = TP / (TP+FN) | False positive rate (FPR)= FP / (FP+TN) | Positive likelihood ratio (LR+) = TPR/FPR | Diagnostic odds ratio (DOR) = LR+/LR− | ||
False negative rate (FNR)= FN / (TP+FN) | True negative rate (TNR) = TN /(FP+TN) | Negative likelihood ratio (LR−) = FNR/TNR | F1 score = 2 · (Precision · Recall) /(Precision + Recall) |
精确度 Accuracy = (TP + TN) / Total
精度 Precision = TP / (TP + FP)
召回率 Recall = TP / P
F1 = 2 · (Precision · Recall) /(Precision + Recall)