I am given the following metrics for a certain classifier : -Total number of cases in the dataset = 110 -Accuracy: 92.7% -Precision : 96.9% -Recall : 95%
Are this information enough to reconstruct the confusion matrix?
[edit thanks to comment] I'm assuming this is a binary classifier, since normally a multi-class classifier would not be evaluated with precision/recall (it would require micro/macro precision/recall).
Yes, that should be enough:
$$\frac{TP+TN}{110}=0.927 \rightarrow TP+TN=101.97$$
This means we have 102 correct predictions, so $FP+FN= 8$ incorrect predictions (since $TP+FP+TN+FN=110$).
$$\frac{TP}{TP+FP}=0.969 \rightarrow TP=31.258\times FP$$
$$\frac{TP}{TP+FN}=0.950 \rightarrow TP=19 \times FN$$
This gives us:
$$\frac{TP}{31.258}+\frac{TP}{19}=8 \rightarrow TP = 94.6$$
let's assume that means 95 true positive instances, so we get:
micro
/macro
modes there's also weighted
mode.
$\endgroup$
Commented
Dec 17, 2019 at 13:28