MLA-C01 Question 396
Select 2You are a Machine Learning Engineer working for a retail company. Your team is building a demand forecasting model using Amazon SageMaker. During the training phase, you notice that the model's training and validation losses are diverging, with the training loss decreasing but the validation loss increasing. Which of the following actions would be most appropriate to address this issue?
- A
Increase the size of the training dataset by augmenting it with synthetic samples.
- B
Reduce the model complexity by decreasing the number of layers or neurons in the architecture.
- C
Enable dropout regularization in the model to reduce overfitting.
- D
Switch to a different optimizer, such as from Adam to SGD.
- E
Increase the learning rate to make the model converge faster.
Show answer and explanation
Correct answers: B, C
Explanation
The diverging losses indicate that the model is overfitting to the training dataset. Overfitting occurs when the model learns patterns specific to the training data that do not generalize to unseen data. To address this, you can reduce the model's complexity (e.g., by decreasing the number of layers or neurons) or apply regularization techniques such as dropout. Both approaches aim to improve the model's ability to generalize to the validation data.
- A. Incorrect.
Increasing the size of the training dataset can help improve generalization, but it may not directly address the issue of diverging losses caused by overfitting, which is the most likely problem here.
- B. Correct.
Reducing the model complexity can help mitigate overfitting by preventing the model from learning overly complex patterns that do not generalize to the validation set. This is an appropriate action.
- C. Correct.
Enabling dropout regularization is an effective method to reduce overfitting by randomly dropping units during training, forcing the model to learn more robust features. This is an appropriate action.
- D. Incorrect.
Switching to a different optimizer might change the convergence behavior, but it does not directly address overfitting and is unlikely to resolve the issue of diverging losses.
- E. Incorrect.
Increasing the learning rate might cause the model to converge faster, but it could also lead to instability in training and does not address overfitting.