Question

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?

Était-ce utile?

La solution

[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:

  • accuracy = 92.7%:

$$\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$).

  • precision = 96.9%:

$$\frac{TP}{TP+FP}=0.969 \rightarrow TP=31.258\times FP$$

  • recall = 95%:

$$\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:

  • $FP = 3$
  • $FN = 5$
  • $TN = 7$
Licencié sous: CC-BY-SA avec attribution
scroll top