Courseiva

AI-900 Practice Question: Describe fundamental principles of machine learning on Azure

A data scientist trains a binary classification model to detect spam emails. The dataset contains 95% legitimate emails (negative class) and 5% spam (positive class). The model predicts all emails as legitimate. The accuracy is 95%, but the model is useless. Which metric would best indicate the model's failure?

⚠ Common exam trap

The trap here is that candidates see 95% accuracy and assume the model is good, failing to recognize that accuracy is meaningless for imbalanced classes without evaluating per-class metrics like recall.

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

Recall (sensitivity) measures the proportion of actual positive cases correctly identified. With 5% spam and the model predicting all as legitimate, recall is 0% because no spam emails are detected. This directly exposes the model's failure to identify the positive class despite high 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.

  • Precision

    Why it's wrong here

    In this scenario, the model predicts only the majority class (non-spam). Precision is the ratio of true positives to all positive predictions: TP/(TP+FP). Because the classifier never predicts spam, both TP and FP are zero, so precision is either undefined (0/0) or assigned 0 by default—a value that merely reflects the absence of positive predictions, not the model's false-negative problem. It therefore fails to expose that every actual spam email was missed.

  • Recall

    Why this is correct

    Recall (sensitivity) is the fraction of actual spam emails that the model correctly identifies: TP/(TP+FN). Here the model predicts no positive cases, so TP=0 and FN equals all spam emails, making recall 0%. A recall of zero is the clearest direct signal that the minority class is completely undetected, which is exactly the failure the evaluation needs to capture. This is why recall is the right metric to flag the problem.

  • F1 score

    Why it's wrong here

    The F1 score is the harmonic mean of precision and recall, and with recall equal to zero the F1 score also collapses to zero (independently of whatever precision value libraries insert for the undefined 0/0 case). While F1=0 correctly indicates poor overall performance, it hides the underlying cause because it combines two separate quantities into one number. Recall alone is more diagnostic because it specifically isolates the total miss of all positive cases.

  • Specificity

    Why it's wrong here

    Specificity measures the true-negative rate, TN/(TN+FP). When a model predicts no spam, every non-spam email is correctly labeled non-spam, so specificity becomes 1.0 (perfect). This high value is dangerously misleading because it suggests the model is doing well while completely ignoring the positive class. The metric evaluates only the ability to recognize negatives, so it cannot reveal that zero spam emails were detected.

About these practice questions

This AI-900 question is part of Courseiva's 985-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.