The confusion behind Confusion Matrix
Breaking down the confusion matrix.
Hello Aliens
In this article, I will try to help you to get the crystal clarity of the confusion matrix. By the end of this article, I guess all the aliens get back to their alien world without any confusion.
Let’s consider a patient rushing to a doctor for the cancer test. The doctor has tested the patients.
Aliens, please concentrate with much interest over here.
The patient has “cancer” in reality and after conducting the test, the doctor said that the patient has “cancer”. Then we have a “True” suggestion by the doctor and the test conducted is saying “Positive” which means the patient is having cancer. So, this is nothing but your “True Positive”.
The patient has “cancer” in reality and after conducting the test, the doctor said that the patient has “no cancer”. Then we have a “False” suggestion by the doctor and the test conducted is saying “Negative” which means the patient is not having cancer.So, this is nothing but your “False Negative”.
Lets jump on to the other side of this.
The patient is “not having Cancer” in reality and after conducting the test, the doctor said that the patient has “cancer”. Then we have a “False” suggestion given by doctor and the test conducted is saying “Positive” which means the patient is having cancer. So, this is your “False Positive”.
The patient is “not having Cancer” in reality and after conducting the test, the doctor said that the patient has “no cancer”. Then we have a “True” suggestion given by doctor and the test conducted is saying “Negative” which means the patient is not having cancer. So, this is your “True Negative”.
Simple right………
I suggest not to go with TP, TN, FP, FN terms. If you go with these terms, that is where you get confused. As far as my opinion is concerned the confusion doesn’t lie in the matrix, but it lies in these terms.
Now, lets move onto some of the metrics which are very important to be discussed now. I think you don’t need any formulae now.
Accuracy:
Accuracy is nothing but, out of all the suggestions given by doctor, which suggestions are correct. The correct suggestions can be when a patient has “cancer” and the doctor suggested he has “cancer”. Also, when a patient has “no cancer” and the doctor says he “don’t have any cancer” after the testing.
Precision:
Lets say we have 100 patients, And for all the 100 patients, the doctor says that they have “cancer”. It is nothing but out of all predictions as “Positive” how many are actually “Positive”.
Recall:
Let’s say out of 100 patients, 20 are having cancer in real. So, after the test, all the 20 should be predicted correct because if there are any wrong predictions then the patients life is under threat as he might not go for any treatment of the disease.
So, for those people who have disease, prediction should be correct and extremely important. So, in this metric this value should be as low as possible.
Besides these metrics we have many other metrics like Specificity, Balanced Accuracy, Positive Predicted Value(PPV), Negative predicted value(NPV), Overall predicted Value(OPV), Hamming Loss.
So, I would encourage the aliens to digest the entire explanation. Once it is done, that brings a close to your confusion as far as the confusion matrix is concerned.
My next article is on Optical Character Recognition (OCR).
Please do follow me on Medium so that you can receive the updates.
Happy Learning…….
Follow me on Linkedin: www.linkedin.com/in/karteek-menda
Bye Aliens.
This is Karteek Menda.
Signing Off