# Confusion matrix terminology

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.

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.

• Many thanks @Oxbowerce for your clear explanations. Sep 28, 2021 at 12:25

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

• for me, it was much more TP must be replaced by by TN and vice versa. Sep 28, 2021 at 13:57