Courseiva
ModelinghardMultiple ChoiceObjective-mapped

MLS-C01 Modeling Practice Question

A machine learning engineer is using SageMaker to train an XGBoost model on a dataset with a severe class imbalance (1:1000). The goal is to maximize recall on the minority class. Which hyperparameter tuning strategy is MOST appropriate?

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 scale_pos_weight to the ratio of negative to positive samples

XGBoost's 'scale_pos_weight' parameter can be set to the ratio of negative to positive instances to help the model focus on the minority class. Adjusting max_delta_step or subsample may help but are secondary. Setting objective to 'binary:logistic' is default, not addressing imbalance.

Answer analysis

Option-by-option breakdown

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

  • Set max_delta_step to a high value

    Why it's wrong here

    max_delta_step is for conservative updates, not directly for imbalance.

  • Increase subsample ratio to 1.0

    Why it's wrong here

    Higher subsample may lead to overfitting, not specifically help imbalance.

  • Set scale_pos_weight to the ratio of negative to positive samples

    Why this is correct

    This parameter adjusts the weight of the minority class, improving recall.

  • Set objective to 'binary:logistic' and tune max_depth

    Why it's wrong here

    This does not directly address class imbalance.

About these practice questions

This MLS-C01 question is part of Courseiva's 1,672-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 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.