Courseiva

AI0-001 Machine Learning and Deep Learning Practice Question

A machine learning engineer is evaluating a classifier on a dataset with 1,000 examples where only 30 are positive. The model predicts the negative class for almost every example. The team reports 97% accuracy and claims success. Which metric should the engineer introduce to reveal the model's poor performance on the positive class?

⚠ Common exam trap

The trap here is trusting overall accuracy on an imbalanced dataset, when a model that always predicts the majority class can score very high while being useless 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 positive class

Accuracy is misleading under severe class imbalance because a trivial majority-class predictor scores high. Recall on the positive class directly measures how many of the 30 true positives were captured, exposing the near-zero detection rate. Recall is the appropriate complement to accuracy when the cost of false negatives is high, such as fraud, medical screening, or safety defects, and it guides the team toward resampling, class weighting, or threshold adjustment.

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 positive class

    Why this is correct

    Recall, or sensitivity, is the fraction of actual positives the model correctly identifies. With only 30 positives and a model that predicts negative almost always, recall will be near zero even though accuracy is 97%. Reporting positive-class recall immediately exposes that the classifier misses nearly all fraud, disease, or defect cases. It is the metric that directly measures performance on the minority class the team cares about.

  • ✗

    Silhouette score

    Why it's wrong here

    The silhouette score evaluates how well samples fit their assigned clusters in unsupervised clustering by comparing intra-cluster and inter-cluster distances. It has no notion of true labels or positive-class detection, so it cannot reveal that a supervised classifier is ignoring the 30 positive examples. Using it here confuses clustering evaluation with classification evaluation and leaves the imbalance problem hidden.

  • ✗

    Mean squared error

    Why it's wrong here

    Mean squared error measures the average squared difference between predicted values and true values, which is meaningful for regression. For a classification task dominated by a majority class, MSE computed on 0/1 labels would still be small because the model is usually right on negatives, and it does not separately expose missed positives. It fails to surface the recall problem that the imbalance scenario is designed to reveal.

  • ✗

    R-squared

    Why it's wrong here

    R-squared quantifies the proportion of variance in a continuous target explained by a regression model. It is undefined for categorical labels and would not communicate how many positive cases were missed. Applying it to a binary classifier is a category error, and even an analogous statistic would not highlight minority-class failures the way recall does in this imbalanced scenario.

About these practice questions

Courseiva writes every AI0-001 question from scratch — 962 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This AI0-001 practice question is part of Courseiva's free CompTIA 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 AI0-001 exam.