nerdexam
Amazon

MLA-C01 · Question #80

An ML engineer is developing a fraud detection model by using the Amazon SageMaker XGBoost algorithm. The model classifies transactions as either fraudulent or legitimate. During testing, the model ex

The correct answer is D. Decrease the value of the max_depth hyperparameter.. Decreasing max_depth reduces the complexity of each decision tree in the ensemble, preventing the model from memorizing the training data's noise and patterns that don't generalize - the classic fix for overfitting, which is exactly what the scenario describes (high train accurac

ML Model Development

Question

An ML engineer is developing a fraud detection model by using the Amazon SageMaker XGBoost algorithm. The model classifies transactions as either fraudulent or legitimate. During testing, the model excels at identifying fraud in the training dataset. However, the model is inefficient at identifying fraud in new and unseen transactions. What should the ML engineer do to improve the fraud detection for new transactions?

Options

  • AIncrease the learning rate.
  • BRemove some irrelevant features from the training dataset.
  • CIncrease the value of the max_depth hyperparameter.
  • DDecrease the value of the max_depth hyperparameter.

How the community answered

(67 responses)
  • A
    9% (6)
  • B
    3% (2)
  • C
    4% (3)
  • D
    84% (56)

Explanation

Decreasing max_depth reduces the complexity of each decision tree in the ensemble, preventing the model from memorizing the training data's noise and patterns that don't generalize - the classic fix for overfitting, which is exactly what the scenario describes (high train accuracy, low test accuracy). Option A (increasing learning rate) makes the model converge faster but amplifies overfitting rather than correcting it. Option B (removing irrelevant features) can help generalization in some cases, but the question points specifically to a depth/complexity problem, not a feature noise problem. Option C (increasing max_depth) is the opposite of what's needed - deeper trees capture more granular splits, making overfitting worse.

Memory tip: Think of max_depth as "how many questions the tree is allowed to ask." A model allowed to ask 20 questions can memorize your training set; one limited to 5 questions must learn the real patterns. When the model "knows the exam but fails the test," shorten the depth.

Topics

#Overfitting#XGBoost#Hyperparameter Tuning#Model Generalization

Community Discussion

No community discussion yet for this question.

Full MLA-C01 Practice