Skip to content

Confusion matrix

Positive (P)Negative (N)
Predicted positive (PP)True positive (TP)False positive (FP, Type I error)
Predicted negative (PN)False negative (FN, Type II error)True negative (TN)
precision=TPPP=TPTP+FPprecision = \frac{TP}{PP} = \frac{TP}{TP + FP} recall=TPP=TPTP+FNrecall = \frac{TP}{P} = \frac{TP}{TP + FN} accuracy=TP+TNP+Naccuracy = \frac{TP + TN}{P + N} specificity=TNN=TPFP+TNspecificity = \frac{TN}{N} = \frac{TP}{FP + TN} threatScore=TPTP+FP+FNthreatScore = \frac{TP}{TP+FP+FN}

Threat score structurally reminds Jaccard index

F1=2TP2TP+FP+FNF_1 = \frac{2TP}{2TP+FP+FN}

F1F_1 score structurally reminds Li, Bo (normalisation)