Question 135 of 1,672
Which Metric to Use for Imbalanced Classification? F1 Score vs AUC-ROC
A data scientist is training a binary classification model on an imbalanced dataset where the positive class is rare. The model currently achieves 95% accuracy but only 10% recall on the positive class. Which metric should the data scientist prioritize to improve model performance?
Quick Answer
The answer is the F1 score. This metric is the correct choice because it is the harmonic mean of precision and recall, providing a single score that balances the trade-off between catching positive cases and avoiding false alarms—critical when the positive class is rare and accuracy is misleadingly high. On the AWS Certified Machine Learning Specialty MLS-C01 exam, this scenario tests your understanding that high accuracy on an imbalanced dataset often masks a model that simply predicts the majority class, as seen here with 95% accuracy but only 10% recall. A common trap is to rely on AUC-ROC, which can still appear strong even with poor recall on the minority class, whereas the F1 score directly penalizes that imbalance. Remember the mnemonic: “When the positive is rare and false alarms are dear, F1 is the metric to steer.”
⚠ Common exam trap
The MLS-C01 exam often tests the misconception that accuracy is always the best metric, but the trap here is that on imbalanced datasets, accuracy is misleadingly high even when the model fails to detect the rare positive class, so candidates must recognize that F1 score (or precision-recall AUC) is the appropriate choice.
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
✓
F1 score
The F1 score is the harmonic mean of precision and recall, making it the best single metric to optimize when the positive class is rare and both false positives and false negatives are costly. With 95% accuracy but only 10% recall, the model is likely predicting the majority class almost exclusively, so improving recall without sacrificing precision is critical — the F1 score directly balances this trade-off.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
F1 score
Why this is correct
F1 score combines precision and recall, making it suitable for imbalanced datasets where both false positives and false negatives are important.
- ✗
AUC-ROC
Why it's wrong here
AUC-ROC may be overly optimistic on imbalanced datasets because it evaluates performance across all thresholds, often overemphasizing the majority class.
- ✗
Precision
Why it's wrong here
Precision alone does not consider recall; a model could have high precision but low recall, missing many positive cases.
- ✗
Accuracy
Why it's wrong here
Accuracy can be misleading when the positive class is rare because a model that always predicts the majority class can achieve high accuracy.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
7 more ways this is tested on MLS-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A data scientist is training a binary classification model on imbalanced data (95% negative, 5% positive). Which metric is most appropriate for evaluating model performance?
easy- A.R-squared
- B.Mean Squared Error (MSE)
- ✓ C.Area Under the ROC Curve (AUC-ROC)
- D.Accuracy
Why C: AUC-ROC is the most appropriate metric for imbalanced binary classification because it evaluates the model's ability to distinguish between positive and negative classes across all classification thresholds, without being biased by the 95% negative majority. It measures the trade-off between true positive rate and false positive rate, making it robust to class imbalance.
Variation 2. A data scientist is training a binary classification model on imbalanced data (95% negative, 5% positive). The model achieves 99% accuracy on the test set but fails to detect any positive cases. Which metric should the scientist focus on to evaluate model performance?
medium- A.Accuracy
- ✓ B.Recall
- C.RMSE
- D.Precision
Why B: Recall (true positive rate) measures the ability to find all positive samples, which is critical for imbalanced datasets where accuracy can be misleading. Option A is wrong because accuracy is high but misleading in imbalanced data. Option C is wrong because RMSE is a regression metric, not suitable for classification. Option D is wrong because precision focuses on the accuracy of positive predictions but does not capture missed positives; recall is more important for detecting all positive cases.
Variation 3. A data scientist is training a binary classification model on imbalanced data (95% negative, 5% positive). The model achieves 95% accuracy but only 10% recall on the positive class. Which metric should be used to evaluate model performance?
easy- ✓ A.F1 score
- B.Accuracy
- C.Recall
- D.Precision
Why A: With imbalanced data (95% negative, 5% positive), accuracy is high despite poor positive class performance. The F1 score (harmonic mean of precision and recall) is a better metric because it captures both false positives and false negatives. Here, recall is only 10%, so even if precision is high, F1 score will be low, reflecting poor model quality.
Variation 4. A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents only 1% of the data. The model achieves 99% accuracy but fails to identify most positive cases. Which metric should the data scientist use to evaluate model performance?
easy- A.R-squared
- ✓ B.F1 score
- C.Accuracy
- D.RMSE
Why B: The F1 score is the harmonic mean of precision and recall, making it ideal for imbalanced datasets where accuracy is misleading. Since the model achieves 99% accuracy by simply predicting the majority class (negative), it fails to capture positive cases; F1 score penalizes this by balancing false positives and false negatives, providing a more truthful performance measure.
Variation 5. A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents 5% of the data. The model achieves 99% accuracy but only identifies 10% of the actual positive cases. Which metric should the data scientist focus on to evaluate the model's performance on the positive class?
medium- A.Precision
- ✓ B.Recall
- C.AUC-ROC
- D.F1 score
Why B: Recall measures the proportion of actual positive cases that are correctly identified. In this imbalanced dataset, the model has high accuracy but low recall (only 10% of positives caught), so recall is the key metric to improve. Option A (Precision) is not the primary focus because it measures how many predicted positives are correct, not coverage. Option C (AUC-ROC) evaluates the model's ability to distinguish classes overall, not specifically the recall of the positive class. Option D (F1 score) is the harmonic mean of precision and recall, but since recall is very low, F1 is also low; however, recall directly addresses the problem of missing positives.
Variation 6. A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents 5% of the data. Which metric is most appropriate for evaluating model performance?
easy- A.Accuracy
- ✓ B.AUC-ROC
- C.Root Mean Squared Error (RMSE)
- D.R-squared
Why B: AUC-ROC is robust to class imbalance and measures the trade-off between true positive rate and false positive rate. Option A is wrong because accuracy can be misleading with imbalanced data. Option C is wrong because RMSE is for regression. Option D is wrong because R-squared is for regression.
Variation 7. A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents only 5% of the data. The model currently achieves 95% accuracy but only 10% recall on the positive class. Which metric should the scientist focus on to improve the model's ability to detect the positive class?
medium- ✓ A.Recall
- B.Accuracy
- C.Precision
- D.AUC-ROC
Why A: (Recall) is the correct focus because recall measures the proportion of actual positive cases correctly identified. With only 10% recall, the model is missing most positive cases despite high accuracy due to class imbalance. Improving recall directly addresses the goal of detecting the positive class. Option B (Accuracy) is misleading in imbalanced datasets as it can be high even if the model predicts all negatives. Option C (Precision) measures the proportion of positive predictions that are correct, which may not increase recall. Option D (AUC-ROC) is a global metric that may not reflect improvements in recall specifically.
Last reviewed: Jun 24, 2026
This MLS-C01 practice question is part of Courseiva's free Amazon Web Services 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 MLS-C01 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.