IIMEEE / JOURNAL

Classification: Precision, Recall and Thresholds

Read a confusion matrix and connect metrics to decisions.

Artificial Intelligence and Data Science · CHAPTER 3 / 5

Level: introductory undergraduate · Study session: 15–20 minutes including practice.

Learning outcome: Read a confusion matrix and connect metrics to decisions.

Before you begin: Complete earlier chapters in this discipline; revise algebra and units as needed.

1. Understand the idea

A classifier score becomes a decision only after a threshold is chosen. Precision describes how many flagged cases are positive; recall describes how many positives are found. Evaluate these using trustworthy labels from the intended population. Anomaly scores are not automatically calibrated fraud probabilities.

2. Write the model

Precision = TP/(TP+FP); recall = TP/(TP+FN)

Define the symbols from the worked case before substituting values. Keep units consistent, record the assumptions and round only after the calculation.

3. Follow a worked example

With TP=30, FP=10, FN=20 and TN=940, precision is 75%, recall is 60%, and accuracy is 97%. The high accuracy hides the missed positives.

4. Explore the model

FNIllustrative threshold0.3100.5200.730
Figure: calculated teaching cases; straight segments connect sampled points, not experimental observations. Read exact values below.
Illustrative scenario sweep — synthetic educational data
Illustrative thresholdTPFPFN
0.3404010
0.5301020
0.720530

Use the three illustrative confusion matrices to calculate precision and recall. Lower threshold catches more positives but also flags more negatives.

5. Reproduce it yourself

  1. Copy the input cases into Excel or a notebook and name each quantity and unit.
  2. Recalculate each result from the stated equation or rule. For qualitative cases, explain the state or partition decision instead.
  3. Change one input, predict the direction of change, then calculate again.
  4. Write one sentence explaining where the model stops being valid.

6. Check your understanding

What is precision for TP=20 and FP=5?

Reveal the answer and check your work

80%.

Compare your result, units and reasoning. If they differ, return to the equation and test the worked case first.

7. Common mistake

These counts are invented teaching data, not results of a trained model.

Further study and academic note

Explore the discipline reference and further learning resources. This is an original IIMEEE introductory teaching note with synthetic examples; it is not a peer-reviewed research result or a professional design specification. Figures were constructed from the listed teaching cases. Resource links support further study and do not imply endorsement.

No comments or reviews yet. Start the discussion.

Leave a Reply