You built an XGBoost model to predict whether a customer will return a purchase. Only 5% of examples are returns. You must maximize detection of returned items while working with a small compute budget. What is the most cost-effective hyperparameter tuning approach?
Choose an answer
Tap an option to check your answer.
Correct answer: Use automatic model tuning (AMT) to tune the class-weight and scale_pos_weight hyperparameters only, and optimize for validation:f1 (maximize)..
Why this is the answer
The correct approach is to use AMT to tune classweight and scaleposweight and optimize for validation:f1. Since only 5% of examples are returns, the dataset is imbalanced. classweight and scaleposweight are crucial hyperparameters in XGBoost for addressing class imbalance, helping the model pay more attention to the minority class (returns). Tuning only these specific hyperparameters is more cost-effective than tuning all possible hyperparameters, especially with a small compute budget, as it reduces the search space significantly. Optimizing for validation:f1 (F1-score) is appropriate for imbalanced datasets because it considers both precision and recall, providing a better measure of performance than accuracy, which can be misleading when one class heavily outweighs the other. Minimizing F1-score would lead to a poorly performing model.
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