Predicted class Vs Actual class
6 Slides104.46 KB
Predicted class Vs Actual class
What’s in the matrix? True Positives (TP) - The value of actual class is yes and the value of predicted class is also yes. (These are the correctly predicted positive values) True Negatives (TN) - The value of actual class is no and value of predicted class is also no. (These are the correctly predicted negative values) E.g. if actual class says this passenger did not survive and predicted class tells you the same thing. False Positives (FP) – When actual class is no and predicted class is yes. E.g. if actual class value indicates that this passenger survived and predicted class tells you the same thing. E.g. if actual class says this passenger did not survive but predicted class tells you that this passenger will survive. False Negatives (FN) – When actual class is yes but predicted class in no. E.g. if actual class value indicates that this passenger survived and predicted class tells you that passenger will die.
What’s Accuracy? Accuracy (TP TN) / (TP FP FN TN) The problem with using accuracy as your main performance metric is that it does not do well when you have a severe class imbalance.
What’s Precision? Precision TP / (TP FP) Precision helps when the costs of false positives are high.
What’s Recall? Recall TP / (TP FN) Recall helps when the cost of false negatives is high.
What’s F1 Score? F1 Score 2*(Recall * Precision) / (Recall Precision) Recall helps when the cost of false negatives is high. Intuitively it is not as easy to understand as accuracy, but F1 is usually more useful than accuracy, especially if you have an uneven class distribution.