Courseiva
Machine Learning Implementation and OperationsmediumMultiple ChoiceObjective-mapped

MLS-C01 Practice Question: Machine Learning Implementation and Operations

A company is building a fraud detection model. The dataset is highly imbalanced (99% legitimate, 1% fraud). The data scientist trains a model using Amazon SageMaker's built-in XGBoost algorithm. The model achieves 99% accuracy but only catches 10% of fraud cases. Which technique should the data scientist apply to improve recall for the minority class?

⚠ Common exam trap

Candidates often choose SMOTE (Option D) as a default oversampling technique for imbalanced data, but the question specifically asks for a technique to apply to XGBoost, where the built-in scale_pos_weight hyperparameter is the most direct and efficient solution, avoiding the overhead and potential noise of synthetic data generation.

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

Set the scale_pos_weight hyperparameter in XGBoost.

Setting the scale_pos_weight hyperparameter in XGBoost adjusts the weight of the positive (minority) class during training, effectively penalizing misclassifications of fraud cases more heavily. This directly addresses the class imbalance by forcing the model to focus on the minority class, which improves recall without altering the dataset distribution. The current 99% accuracy with only 10% fraud recall indicates the model is biased toward the majority class, and scale_pos_weight is the most direct and efficient fix within XGBoost.

Answer analysis

Option-by-option breakdown

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

  • Use random under-sampling of the majority class.

    Why it's wrong here

    Under-sampling discards data, may lose information.

  • Set the scale_pos_weight hyperparameter in XGBoost.

    Why this is correct

    This adjusts the weight of positive class to handle imbalance.

  • Use mean squared error as the objective function.

    Why it's wrong here

    MSE is for regression, not classification.

  • Use SMOTE to oversample the minority class.

    Why it's wrong here

    SMOTE can be used but XGBoost has scale_pos_weight parameter.

About these practice questions

One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 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.