StudyAIStudyAI
Pro
Lesson 69 min

Evaluation Metrics

Why accuracy can mislead — precision, recall, and the confusion matrix.

What you will learn
  • 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.

Real-world use

For cancer screening you favour high recall (catch every real case) even at the cost of some false alarms — accuracy alone would hide that.

Common mistakes
  • Trusting high accuracy on imbalanced data without checking precision and recall.
Practice

For a fraud detector, argue whether precision or recall matters more and why.

Knowledge check
0/2 answered

1. Why can accuracy mislead on imbalanced data?

2. Recall measures...

Answer all questions to check.