An XGBoost model performs well on test data but overfits and performs poorly on unseen data. Which hyperparameter adjustment is recommended to reduce overfitting?
Choose an answer
Tap an option to check your answer.
Correct answer: Decrease the max_depth parameter value..
Why this is the answer
Decreasing the maxdepth parameter value is a common and effective way to reduce overfitting in XGBoost. A smaller maxdepth limits how deep each individual tree in the ensemble can grow, making the model simpler and less likely to memorize the training data. This improves generalization to unseen data. Increasing maxdepth would allow trees to grow deeper, making the model more complex and exacerbating overfitting. Changing the objective to binary:logistic is for classification tasks and does not directly address overfitting; it defines the loss function. Decreasing minchildweight would make the model more sensitive to individual data points, allowing it to split on smaller groups and potentially increasing overfitting, rather than reducing it.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed