Question 403 of 1,672
MLS-C01 Modeling Practice Question
A data scientist is training a binary classification model on a highly imbalanced dataset (0.1% positive class). To improve recall, the team decides to use SageMaker's built-in XGBoost algorithm. Which parameter adjustment is most likely to increase recall without significantly sacrificing precision?
⚠ Common exam trap
The MLS-C01 exam often tests the misconception that simply increasing model complexity (max_depth) or data usage (subsample) will fix imbalance, when the correct approach is to use a class-weighting parameter like scale_pos_weight that directly addresses the skewed gradient contributions.
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
Setting scale_pos_weight to the ratio of negative to positive samples (approximately 999:1) tells XGBoost to assign a higher penalty to misclassifications of the minority positive class. This directly increases the gradient contribution from positive samples during training, which shifts the decision boundary to improve recall while maintaining a balance that avoids excessive false positives, thus preserving precision.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase max_depth from 5 to 10
Why it's wrong here
Increasing max_depth may cause overfitting but does not specifically improve recall on imbalanced data.
- ✗
Reduce num_round from 100 to 50
Why it's wrong here
Reducing num_round typically reduces model capacity and can hurt recall.
- ✗
Increase subsample from 0.8 to 1.0
Why it's wrong here
Increasing subsample uses more data per iteration but does not directly target class imbalance.
- ✓
Set scale_pos_weight to the ratio of negative to positive samples
Why this is correct
scale_pos_weight adjusts class weights to focus on the minority class, improving recall.
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 →
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.