5
$\begingroup$

Can someone explain me the logic behind the confusion matrix?

  • True Positive (TP): prediction is POSITIVE, actual outcome is POSITIVE, result is 'True Positive' - No questions.
  • False Negative (FN): prediction is NEGATIVE, actual outcome is POSITIVE, result is 'False Negative' - Why is that? Shouldn't it be 'False Positive'?
  • False Positive (FP): prediction is POSITIVE, actual outcome is NEGATIVE, result is 'False Positive' - Why is that? Shouldn't it be 'True Negative'?
  • True Negative (TN): prediction is NEGATIVE, actual outcome is NEGATIVE, result is 'True Negative' - Why is that? Shouldn't it be 'False Negative'?

enter image description here

$\endgroup$
  • $\begingroup$ Stick to positive/negative for the test, and True/false for whether the test matches reality (actual outcome). Then it should be clear. $\endgroup$ – Mitch Mar 21 at 18:22
3
$\begingroup$

A confusion matrix is a table that is often used to describe the performance of a classification model. The figure you have provided presents a binary case, but it is also used with more than 2 classes (there are just more rows/columns).

The rows refer to the actual Ground-Truth label/class of the input and the columns refer to the prediction provided by the model.

The name of the different cases are taken from the predictor's point of view.

True/False means that the prediction is the same as the ground truth and Negative/Positive refers to what was the prediction.

The 4 different cases in the confusion matrix:

True Positive (TP): The model's prediction is "Positive" and it is the same as the actual ground-truth class, which is "Positive", so this is a True Positive case.

False Negative (FN): The model's prediction is "Negative" and it is wrong because the actual ground-truth class is "Positive", so this is a False Negative case.

False Positive (FP): The model's prediction is "Positive" and it is wrong because the actual ground-truth class is "Negative", so this is a False Positive case.

True Negative (TN): The model's prediction is "Negative" and it is the same as the actual ground-truth class, which is "Negative", so this is a True Negative case.

$\endgroup$
  • 2
    $\begingroup$ Thanks a lot! It's all clear now :) $\endgroup$ – Tauno Tanilas Mar 21 at 11:04
2
$\begingroup$

Please find the below:

  • False Negative (FN): prediction is NEGATIVE, actual outcome is POSITIVE, result is 'False Negative' - Why is that? Shouldn't it be 'False Positive'?
    Answer : The predictive model supposed to give the answer as 'Positive', but it predicted as 'Negative', which means Falsely predicted as Negative aka False Negative.

  • False Positive (FP): prediction is POSITIVE, actual outcome is NEGATIVE, result is 'False Positive' - Why is that? Shouldn't it be 'True Negative'?
    Answer : The predictive model supposed to give the answer as 'Negative', but it predicted as 'Positive', which means Falsely predicted as Positive aka False Positive.

  • True Negative (TN): prediction is NEGATIVE, actual outcome is NEGATIVE, result is 'True Negative' - Why is that? Shouldn't it be 'False Negative'?
    Answer : The predicted output supposed to be Negative, and model also predicted as Negative.

For better understanding, you can run a simple binary classfication model and analyze the confusion matrix.

Thank you, KK

$\endgroup$
1
$\begingroup$

Seems like you understand the meaning of the confusion matrix, nut not the logic used to name its entries!

Here are my 5 cents:

The names are all of this kind:

<True/False> <Positive/Negative>
     |                |
   Part1            Part2
  1. The first part explains if the prediction was right or not. If you have only True Positive and True Negative your model is perfect. If you have only False Positive and False Negative your model is really bad.

  2. The second part explains the prediction of the model.

So:

  • False Negative (FN): the prediction is NEGATIVE (0) but the first part is False, this means that the prediction is wrong (should have been POSITIVE (1)).

  • False Positive (FP): the prediction is POSITIVE (1) but the first part is False, this means that the prediction is wrong (should have been NEGATIVE (0)).

  • True Negative (TN): prediction is NEGATIVE and the first part is True. The prediction is right (model predicted NEGATIVE, for NEGATIVE samples)

$\endgroup$
0
$\begingroup$

True means Correct, False means Incorrect.

True Positive (TP): Model predicted P, which is Correct.

False Positive (FP): Model predicted P, which is Incorrect, must have predicted N.

True Negative (TN): Model predicted N, which is Correct.

False Negative (FN): Model predicted N, which is Incorrect, must have predicted P.

$\endgroup$

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.