Practical technology learning
Precision and Recall: Explain a Binary Classifier Using Small Counts
Use a small set of invented counts to make two classification metrics inspectable. Define the positive label first, then explain which denominator each metric uses. The example is a mathematical teaching fixture and is not evidence of a trained model, admissions outcome or real-world performance.
Define the positive event
Choose a fictional task such as identifying sample items marked “review required”. State which label counts as positive. Write what a false alarm and a missed positive would mean in that task without borrowing sensitive real records.
Keep the label convention next to the counts. A metric can be misread when one person interprets positive as an adverse event while another assumes it means a successful outcome.
Build an independently checkable fixture
Use six true positives, two false positives and three false negatives. If you want a complete binary confusion matrix for a later exercise, add an explicit true-negative count. Do not invent it indirectly from the three stated values.
List the predicted-positive total as eight and the actual-positive total as nine. These totals should be explainable from the counts before any library function is called.
Calculate the two questions separately
Precision is the proportion of predicted positives that are true positives: 6 divided by 8 equals 0.75. Recall is the proportion of actual positives that are found: 6 divided by 9 equals two thirds, or about 66.7 percent.
Keep rounding explicit. The decimal representation of two thirds is not exactly 0.667. If you later compare your calculations with software, check the positive label and averaging configuration as well as the displayed precision.
Change one kind of error
Increase false positives from two to four while retaining the other stated counts. Precision becomes 6 divided by 10, or 60 percent, while recall remains two thirds. Reset the fixture, then increase false negatives from three to six; recall becomes one half while precision remains 75 percent.
Explain why each denominator changes. Treat these as separate synthetic comparisons, not as observations of a particular threshold change in a fitted model. A real threshold change can alter several counts together.
Review the reported score
- The positive label is named.
- The counts and denominators are available.
- Rounding is stated consistently.
- Error meaning is tied to the intended task.
- Dataset and evaluation limitations accompany any result.
Keep the claim proportional to the evidence
A correct calculation proves that the arithmetic matches the fixture; it does not prove generalisation or deployment readiness. Mango Engineers’ machine-learning course includes model-evaluation foundations; ask about the current Python prerequisites and practical learning scope.