Confused?
1904 (Origin): Karl Pearson
As artificial intelligence grew, the "confusion matrix" became a standard tool for evaluating classification models.
What we get from confusion metric?
Note
TP - Model sahi tha aur model ne response me P (Positive kaha tha) aur actually me Positive tha
TN - Model sahi tha aur model ne response me N (Negative kaha tha) aur actually me Negative tha
FP - Model galat tha aur model ne response me P (Positive kaha tha) lekin actually me Negative tha
FN - Model galat tha aur model ne response me N (Negative kaha tha) lekin actually me Positive tha
Below are the possibilities of representing a confusion matrix
Predicterd on X-axis with first col as NO
And actual as Y-axis with first col as NO
| Predicted: NO/0 | Predicted: YES/1 | |
|---|---|---|
| Actual: NO/0 | True Negative (TN) | False Positive (FP) |
| Actual: YES/1 | False Negative (FN) | True Positive (TP) |
Predicterd on X-axis with first col as YES
And actual as Y-axis with first col as YES
| Predicted: YES/1 | Predicted: NO/0 | |
|---|---|---|
| Actual: YES/1 | True Positive (TP) | False Negative (FN) |
| Actual: NO/0 | False Positive (FP) | True Negative (TN) |
Predicterd on Y-axis with first col as NO
And actual as X-axis with first col as NO
| Actual: NO/0 | Actual: YES/1 | |
|---|---|---|
| Predicted: NO/0 | True Negative (TN) | False Negative (FN) |
| Predicted: YES/1 | False Positive (FP) | True Positive (TP) |
Predicterd on Y-axis with first col as YES
And actual as X-axis with first col as YES
| Actual: YES/1 | Actual: NO/0 | |
|---|---|---|
| Predicted: YES/1 | True Positive (TP) | False Positive (FP) |
| Predicted: NO/0 | False Negative (FN) | True Negative (TN) |
How to understand all these 4 - TP, TN, FP, FN
Dekho First letter - T or F
T or F
First letter ye represent karta hai ki model ka response sahi hua ki galat
Ques: Sahi kab hoga?
Ans: Jab model ne jo kaha wo actual me jo hai usase match karta ho
Sahi - T
Galat - F
Second letter - P or N
P or N
Second letter ye represent karta hai ki model ne apane response me kya kaha (Positive(➕) kaha ya Negative(➖))
Positive - P
Nevative - N
Summary
TP - If this is higher - model is doing good at predicting Positive cases
TN - If this is higher - model is doing good at predicting Negative cases
FP - Many false positives → model is crying “YES!” too often
FN - Many false negatives → model is missing real cases