MLA-C01 Question 152
Single answerYou are training a machine learning model using Amazon SageMaker to predict customer churn for a subscription-based service. During training, you notice that the model's validation loss stops decreasing and starts to increase after a certain number of epochs. What is the BEST approach to refine your model and improve its performance?
- A
Enable early stopping based on the validation loss and reduce the number of training epochs.
- B
Increase the learning rate of the optimizer to converge faster.
- C
Add more layers to the model architecture to increase its capacity.
- D
Switch from the current optimizer to an optimizer with momentum, such as Adam.
Show answer and explanation
Correct answer: A
Explanation
The increase in validation loss after a certain number of epochs is a sign of overfitting. Early stopping is a common technique to prevent overfitting by halting the training process when the model's performance on the validation set deteriorates. This helps improve the model's ability to generalize to unseen data.
- A. Correct.
This is the correct option. Early stopping monitors the validation loss and halts training when it starts to increase, preventing overfitting and improving generalization.
- B. Incorrect.
Increasing the learning rate may cause the model to converge too quickly, potentially leading to unstable training and poor performance.
- C. Incorrect.
Adding more layers increases the model's capacity but may lead to overfitting, especially if the model already shows signs of overfitting (validation loss increasing).
- D. Incorrect.
Switching to an optimizer with momentum is not directly related to addressing overfitting. While it might improve convergence, it does not solve the issue of validation loss increasing.