1
$\begingroup$

Say the number of negativ classes is $9990$ and the number of positive classes is $10$.
If a model predicts all examples to belong to the negative class, how accurate is this prediction?

So what we got:

  • Actual positive (TP): 10
  • Actual negative (TN): 9990
  • Predicted positive (FP): 0
  • Predicted negativ (FN): 10000

So the accuracy would be: $\frac{TP+TN}{TP+TN+FP+FN} = \frac{10+10000}{10+10000+0+10000)} = 0.5$

But it doesn't seem to be correct.

$\endgroup$
2
  • $\begingroup$ TP is "True Positive" (predicted positive and actually positive: $0$ here). TN is "True Negative" (predicted negative and actually negative: $9990$ here). FP is "False Positive" (predicted positive and actually negative: $0$ here). FN is "False Negative" (predicted negative and actually positive: $10$ here). $\endgroup$
    – Henry
    Commented Feb 5, 2016 at 18:47
  • $\begingroup$ Despite the question starting with important definitional errors, this Q/A is a concise and useful reference for new stats learners. Thank you. $\endgroup$
    – Merlin
    Commented Feb 9, 2022 at 18:58

1 Answer 1

4
$\begingroup$

Yeah, that's wrong.

FN = false negative = 10

FP = false positive = 0

TP = true positive = 0

TN = true negative = 9990

accuracy = $\frac{9990 + 0}{10 + 9990 + 0 + 0}$ = 99.9%

$\endgroup$
4
  • 1
    $\begingroup$ Isn't it $\frac{TP+TN}{TP+TN+FP+FN}$? $\endgroup$ Commented Feb 5, 2016 at 17:40
  • $\begingroup$ yeah, sorry, I've changed it. $\endgroup$ Commented Feb 5, 2016 at 17:44
  • 2
    $\begingroup$ I think TP should be 0, as nothing has been classified positive. $\frac{0+9990}{0+9990+0+10} = 99.9\%$ $\endgroup$ Commented Feb 5, 2016 at 17:53
  • $\begingroup$ Wow, i'm failing here. I'm pretty sure it is now correct. $\endgroup$ Commented Feb 5, 2016 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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