Evaluation Metrics
Why accuracy can mislead — precision, recall, and the confusion matrix.
- ✓Why accuracy fails on imbalanced data
- ✓Precision vs recall
- ✓Reading a confusion matrix
Explanation
Accuracy (percent correct) is fine when classes are balanced, but misleading when they are not. If 99% of transactions are legit, a model that always says 'legit' is 99% accurate and totally useless.
Precision asks: of the items flagged positive, how many really were? Recall asks: of all the real positives, how many did we catch? There is usually a trade-off between them.
The confusion matrix lays out true/false positives and negatives so you can see exactly where the model errs.
For cancer screening you favour high recall (catch every real case) even at the cost of some false alarms — accuracy alone would hide that.
- • Trusting high accuracy on imbalanced data without checking precision and recall.
For a fraud detector, argue whether precision or recall matters more and why.
1. Why can accuracy mislead on imbalanced data?
2. Recall measures...