A diagnostic evaluation tool
Confusion Matrix Calculator
Also known as an error matrix. Enter the four cells of a 2×2 confusion matrix to compute precision, recall, specificity, NPV, MCC, F-beta, and the full family of derived diagnostic statistics.
01
Enter the matrix
Predicted condition
Positive
Negative
Actual +
Actual −
02
Derived statistics
Total samples: —
Positive class metric
Negative class metric
Accuracy ACC
—
(TP + TN) / N
Matthews CC MCC
—
(TP·TN − FP·FN) /
√((TP+FP)(TP+FN)(TN+FP)(TN+FN))
√((TP+FP)(TP+FN)(TN+FP)(TN+FN))
F-β score F1
—
(1+β²)·P·R / (β²·P + R)
Predictive values
+Precision PPV
—
TP / (TP + FP)
−Neg. Pred. Value NPV
—
TN / (TN + FN)
+False Disc. Rate FDR
—
FP / (FP + TP), = 1 − PPV
−False Omission FOR
—
FN / (FN + TN), = 1 − NPV
True and false rates
+Sensitivity TPR, Recall
—
TP / (TP + FN)
−Specificity TNR
—
TN / (TN + FP)
−False Pos. Rate FPR
—
FP / (TN + FP), = 1 − TNR
+False Neg. Rate FNR
—
FN / (TP + FN), = 1 − TPR
Distribution and error
+Positive prevalence
—
(TP + FN) / N
−Negative prevalence
—
(TN + FP) / N
Balanced Accuracy
—
(TPR + TNR) / 2
Error rate
—
(FP + FN) / N, = 1 − ACC