6 Comments

This article about TP, TN, FP and FN is confusing.

If you have a bunch of images of cats and dog and you want to measure a classifier's accuracy in distinguishing between them, then start off with what you are looking for. Let's say we are looking for dog pictures.

If the classifier identifies a dog then it is a positive result, if it identifies a cat that is a negative (non-dog) result.

But, of course, the classifier might be wrong. If it is correct then that is a true result, if it is wrong that is a false result.

So we have positive and negative results which can be either true or false. Thus:

A dog image classified as a dog is a true positive result - TP

A cat image classified as a dog is a false positive result - FP

A dog image classified as a cat is a false negative result - FN

A cat image classified as a cat is a true negative result - TN

Is it a positive or negative classification and is that classification correct or not (true or false)? That's all.

Expand full comment

How to know the model predicted the outcome is true or false?

Expand full comment

You have the actual labels with you as you are building the model. You can tell whether it's correct or not.

Expand full comment

So in the exercise given the actual class can be considered as true right?

Expand full comment

since its given as true class in the first column

Expand full comment

You don't unless you assign dog=true, cat=false (or vice versa). The possible outcomes to the first question are True dog, False dog, True cat, False cat.

Expand full comment