MATLAB: What is a confusion matrix

confusion matrix

I am working through the Wine Classification example, and by this point I've seen the Confusion Matrix a lot. What is it used for?
I am confused as to what these matrices are telling me(no pun intended). Take for example the 'Test Confusion Matrix,' what do the different colored boxes represent?

Best Answer

A Confusion matrix (link), specifically one that is (2x2), tells you the accuracy of your classifier. It will list correct classifications as ‘true positives’ or ‘true negatives’, and incorrect classifications as ‘false positives’ or ‘false negatives’. It is also possible to derive the sensitivity, specificity, positive predictive value, and others. This is particularly important in diagnostic tests for the presence or absence of a particular condition or disease based on a single test.
Related Question