Question 119 of 1,672
XGBoost Overfitting: Adjust Max Depth and Min Child Weight
A data scientist is training a binary classifier on a dataset with 1 million rows and 500 features. The model uses XGBoost and achieves an AUC of 0.95 on the training set but only 0.72 on the test set. The scientist suspects overfitting. Which combination of hyperparameter adjustments is most likely to improve generalization?
Quick Answer
The clue that should point you toward these two hyperparameters is the classic overfitting signature: a very strong training AUC of 0.95 paired with a much weaker test AUC of 0.72, meaning the model has memorized training-set noise instead of learning generalizable patterns. In XGBoost, tree depth is one of the most direct controls over how specific a model's decision boundaries can become: a large max_depth lets each tree carve out narrow, idiosyncratic regions that fit individual training rows rather than broad patterns, so decreasing it forces simpler, more general trees. min_child_weight works as a complementary regularizer: it sets a minimum threshold on the sum of instance weights (essentially the amount of evidence) required before a node is allowed to split further, so raising it prevents the algorithm from creating splits based on just a handful of noisy or sparse observations. Used together, these two settings attack overfitting from both directions, one limits how deep and specific any single tree can get, the other limits how eagerly the algorithm creates new splits, which is why they're a natural pair for closing a training-versus-test performance gap. When you see a large gap between training and test performance in a tree-based model like XGBoost, think first about the hyperparameters that control tree complexity and split eligibility, since those are usually the fastest way to rein in variance without redesigning the whole pipeline.
⚠ Common exam trap
The MLS-C01 exam often tests the misconception that increasing regularization parameters like 'max_depth' or decreasing 'learning_rate' alone will fix overfitting, when in fact the correct approach is to reduce model complexity (decrease 'max_depth') and increase split regularization (increase 'min_child_weight').
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
✓
Decrease 'max_depth' and increase 'min_child_weight'
Decreasing 'max_depth' reduces the complexity of individual trees, preventing the model from learning overly specific patterns in the training data. Increasing 'min_child_weight' forces the algorithm to require a higher sum of instance weights (hessian) before further partitioning, which acts as a regularization mechanism that discourages splits on noisy or sparse data. Together, these adjustments directly combat overfitting in XGBoost by limiting tree depth and requiring more evidence for splits, which improves generalization from the training AUC of 0.95 to a higher test AUC.
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' and decrease 'learning_rate'
Why it's wrong here
Increasing max_depth increases complexity, likely worsening overfitting.
- ✗
Increase 'subsample' and decrease 'colsample_bytree'
Why it's wrong here
Increasing subsample uses more data, which might actually reduce overfitting, but the combination is not as direct as A.
- ✓
Decrease 'max_depth' and increase 'min_child_weight'
Why this is correct
Decreasing max_depth reduces tree complexity; increasing min_child_weight prevents overfitting by requiring more samples per leaf.
- ✗
Decrease 'gamma' and increase 'learning_rate'
Why it's wrong here
Decreasing gamma allows more splits, increasing overfitting; increasing learning rate may cause unstable convergence.
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
1 more way 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 gradient boosting model using SageMaker. The model is overfitting to the training data. Which TWO actions can help reduce overfitting? (Choose 2)
medium- A.Increase the number of boosting rounds
- B.Increase the learning rate
- ✓ C.Increase the minimum child weight
- ✓ D.Reduce the maximum depth of trees
- E.Use a larger training dataset
Why C: Increasing the learning rate actually worsens overfitting; increasing max_depth increases model complexity. Reducing max_depth and increasing min_child_weight both regularize the model.
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.