Courseiva
easyMultiple Choice

MLA-C01 Practice Question: A data scientist wants to evaluate the…

A data scientist wants to evaluate the performance of a binary classification model. The dataset is highly imbalanced with only 5% positive class. Which metric should be used to evaluate the model?

⚠ Common exam trap

AWS often tests the misconception that accuracy is always a valid metric, leading candidates to overlook the impact of class imbalance on model evaluation.

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

In highly imbalanced datasets (e.g., only 5% positive class), accuracy is misleading because a model that predicts the majority class for all instances would achieve 95% accuracy without any predictive power. The F1-score is the harmonic mean of precision and recall, making it robust to class imbalance by balancing false positives and false negatives. It is the standard metric for binary classification on imbalanced data in AWS SageMaker and other ML platforms.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Accuracy

    Why it's wrong here

    Accuracy reports the proportion of all predictions that are correct, so a model predicting the majority class for every row scores 95% while detecting no positives. It is tempting because accuracy is the default metric for balanced classification, where classes occur at roughly equal rates and overall correctness genuinely reflects performance.

  • ✗

    Mean Squared Error

    Why it's wrong here

    Mean Squared Error averages squared differences between predicted and actual values, requiring continuous numeric outputs; a binary classifier emits discrete class labels, so the calculation is meaningless. It is tempting because MSE is the standard loss for regression, where the target is a continuous quantity and magnitude of error matters.

  • ✗

    R-squared

    Why it's wrong here

    R-squared measures the proportion of variance in a continuous target explained by a regression model; class labels have no meaningful variance to partition. It is tempting because R-squared is the default goodness-of-fit statistic for linear regression, where predicting a numeric response from numeric features is the task.

  • ✓

    F1-score

    Why this is correct

    F1-score suits this imbalanced dataset because it is the harmonic mean of precision and recall, so it balances false positives against false negatives rather than being dominated by the 95% negative class. Accuracy would mislead here, since predicting all negatives alone yields 95%. F1 therefore reflects genuine minority-class detection.

About these practice questions

This MLA-C01 question is part of Courseiva's 665-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 MLA-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 MLA-C01 exam.