A model has 95 percent accuracy, but only 3 percent of test images contain the rare defect you care about. What should you report?
- Exam domain
- Experimentation25% of the exam
- Difficulty
- Medium
- In this mock
- 13 questions on this domainPractise this domain
Why the exam asks this
Experimentation (25% of the exam)
Objective in the exam guide: Test AI models to ensure their accuracy and effectiveness.
Testing accuracy and effectiveness means picking the right metric.
Why B is the answer
Precision and recall for the defect class
With heavy imbalance, accuracy can be high while the model misses most defects. Precision and recall on the rare class show real effectiveness.
Remember: Imbalanced data: report precision and recall.
How it works
Testing models for accuracy and effectiveness uses metrics suited to the task and class balance.
In detail
- Accuracy misleads on imbalanced data.
- Report per-class metrics.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. The number of images in the datasetWrong
Dataset size is not performance.
B. Precision and recall for the defect classRight
Imbalanced data: report precision and recall.
C. Only overall accuracyWrongMost tempting
Accuracy hides missed defects.
Why it tempts: Accuracy is the familiar headline number.
D. Only training lossWrong
Training loss is not a test metric.
Use case
An illustrative scenario, not a real incident.
Illustrative: recall on defects is only 40 percent despite 95 percent accuracy, so the model is not ready.
See it in different ways
mindmap
root(("Metrics"))
n1["Precision"]
n2["Flagged ones that are real"]
n3["Recall"]
n4["Real ones that are flagged"]
n5["F1"]
n6["Balance of both"]How to read this chart
- The centre is "Metrics".
- "Precision" covers "Flagged ones that are real".
- "Recall" covers "Real ones that are flagged".
- "F1" covers "Balance of both".
flowchart TD
Q{"Is the class you care about rare?"}
Q -->|"Yes"| A0["Precision, recall, F1"]
Q -->|"No, balanced"| A1["Accuracy is fine as a summary"]How to read this chart
- At "Is the class you care about rare?": if "Yes", go to "Precision, recall, F1"; if "No, balanced", go to "Accuracy is fine as a summary".
Related questions
Learn more
- Our lesson: Experiments, data quality and analysis
- Practise Experimentation questions in the mock exam
- Source: Metrics and scoring (scikit-learn)
- Cross-validation (scikit-learn)
- Metrics and scoring (scikit-learn)
- Common pitfalls and recommended practices (scikit-learn)
- Grad-CAM: Visual Explanations from Deep Networks (arXiv)
- Matplotlib documentation