0
$\begingroup$

Background: I talked to my friend today and according to herm(him/her) I can calculate precision, recall and accuracy with the current information.

Total instances T: 19,532.

Instances belonging to class F: 8829.

What my classifier totally found, lets call it TS: 11,120.

The number of instances of TS belonging to F, lets call it FTS: 6622.

What is TP, TN, FP and FN here? From my understanding I get these, not sure if it is correct though.

  1. (TP: 6622)
  2. (TN: 11120-6622=4498)
  3. (FP:11120-8829=2291)
$\endgroup$
4
  • $\begingroup$ What does "What my classifier totally found" mean? Is it number of positives, i.e. class F, your classifier found out of 19532? $\endgroup$
    – gunes
    May 7 '19 at 20:15
  • $\begingroup$ @gunes Yes, out of 19,532 instances, my classifier classified 11,120 to belong to class TS. Out of 11,120 of those instances, 6622 belonged to a the desired class F. $\endgroup$ May 7 '19 at 20:18
  • $\begingroup$ There should be two classes: F = positives, and F' = negatives. No class TS as I understand. So, 11,120 is classified as class F by your classifier. But, 6622 were really F. Isn't it? $\endgroup$
    – gunes
    May 7 '19 at 20:35
  • $\begingroup$ @gunes Yes. 6622 is really F class, sorry for the confusion. $\endgroup$ May 7 '19 at 20:40
1
$\begingroup$

I'll slightly round up the numbers for ease of notation.

  1. Your TP, i.e. True Positives is correct.
  2. TN (True Negatives) + FP (False Positive) = Total Negatives = $19.5K-8.8K=10.7K$. Plug-in the FP in (3) and get TN.
  3. FP (False Positives) = We called Positive - True Positive = $11.1K-6.6K\approx 4.5K$ (i.e. your answer for TN is actually FP).

Precision, recall and accuracy can be calculated easily from these three.

$\endgroup$
10
  • $\begingroup$ I became very confused by this answer. Did I get this correct? FP = 4.5K TP = 6.6K TN = 10.7k FN = incorrectly rejected..? $\endgroup$ May 7 '19 at 21:06
  • $\begingroup$ Wasn't 4.5k FP and not 11.7K -4.5K? $\endgroup$ May 7 '19 at 21:31
  • $\begingroup$ Cheers! How do you calculate the FN? $\endgroup$ May 8 '19 at 6:07
  • $\begingroup$ FN is False Negatives = (We called Negative) - (True Negatives). TN is found in (2). We called 19.5K-11.1K negatives in total. $\endgroup$
    – gunes
    May 8 '19 at 6:11
  • 1
    $\begingroup$ +1. The Wikipedia page on sensitivity and specificity is long, but has a lot of very good information and examples. $\endgroup$ May 8 '19 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.