AI-900 Practice Question: Describe fundamental principles of machine learning on Azure
A data scientist trains a binary classification model to predict loan defaults. The dataset contains 98% non-default cases and only 2% default cases. The model predicts 'non-default' for every instance, achieving 98% accuracy on the test set. Which metric would best reveal that the model fails to identify any actual defaults?
⚠ Common exam trap
Test-takers frequently choose accuracy (D) because it shows a high number, failing to recognize that class imbalance can make accuracy a poor indicator of model performance, especially for the minority class.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Recall for the default class
Recall for the default class measures the proportion of actual default cases that the model correctly identifies. With the model predicting 'non-default' for every instance, recall for the default class is 0%, because it fails to capture any true positives. This directly reveals the model's inability to detect any actual defaults, despite the high overall accuracy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Recall for the default class
Why this is correct
Recall measures the fraction of actual default instances that the model catches: TP/(TP+FN). Because the model emits zero positive predictions, TP = 0 and FN = all actual defaults, so recall = 0/(0+FN) = 0. This directly quantifies the complete failure to identify any defaults, making it the clearest diagnostic metric.
- ✗
Precision for the default class
Why it's wrong here
Precision = TP/(TP+FP). With no default predictions, TP = 0 and FP = 0, so the denominator is zero and precision is undefined (0/0), not simply zero. It cannot be computed or compared, whereas recall is well-defined and directly exposes that no defaults are found.
- ✗
F1 score for the default class
Why it's wrong here
F1 = 2 * (precision * recall) / (precision + recall). Since recall is 0, the numerator is 0; even if precision is treated as undefined, F1 collapses to 0 because no true positives were retrieved. However, recall alone already pinpoints the root cause (no default detection), while F1 combines precision and recall and obscures the specific failure mode.
- ✗
Accuracy
Why it's wrong here
Accuracy = (TP+TN)/(total). Here all non-defaults are predicted correctly (TN = 98% of data) and all defaults are missed, so accuracy = 0.98, matching the dominant class. This high value masks the fact that the model is useless for default detection, highlighting why accuracy is misleading under class imbalance.
Go deeper
Related to this question
Learn chapter
Regression and Classification
Key term
Classification
Classification is a supervised machine learning technique used to predict a category or class label for new data based on patterns learned from labeled training data.
Key term
Model
In IT and AI, a model is a trained mathematical representation that learns patterns from data to make predictions or decisions.
About these practice questions
Courseiva writes every AI-900 question from scratch — 985 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-900 exam.