0
$\begingroup$

I am working on machine learning with a supervised problem with 2 classes: NO and YES, and I need some precision about confusion matrix. I read 2 differents terminologies, some writes matrix confusion as: $$ \begin{pmatrix} & &\text{Positive Prediction} &\text{Negative Prediction}\\ &\text{Actual Positive Class} &TP &FP \\ &\text{Actual Negative class} &FN &TN \end{pmatrix} $$ where TP = true positive, FP = false positive, FN = false negative, and TN = true negative.

And I also saw, the confusion matrix written like that: $$ \begin{pmatrix} & &\text{Predicted NO} &\text{Predicted YES}\\ &\text{Actual NO Class} &TN &FP \\ &\text{Actual YES class} &FN &TP \end{pmatrix} $$

TP and TN are inverted. Which one is corrected, especially for my problem? Thanks.

$\endgroup$
0

2 Answers 2

0
$\begingroup$

I think this page from Google's machine learning crash course explains true vs false and positive vs negative very well. In addition the wikipedia page on the confusion matrix is very informative. As you will see the second matrix is the correct one, since a false positive is an example that is incorrectly predicted as being positive.

$\endgroup$
1
  • $\begingroup$ Many thanks @Oxbowerce for your clear explanations. $\endgroup$
    – user979974
    Sep 28, 2021 at 12:25
0
$\begingroup$

The first matrix is wrong. FP must be replaced by FN and vice versa.

$\endgroup$
1
  • $\begingroup$ for me, it was much more TP must be replaced by by TN and vice versa. $\endgroup$
    – user979974
    Sep 28, 2021 at 13:57

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.