MLS-C01 Question 219
Select 4You are building a machine learning model using Amazon SageMaker, and you notice that your model is overfitting the training data. Which of the following steps can help mitigate overfitting?
- A
Increase the size of the training dataset.
- B
Use L1 or L2 regularization in the model.
- C
Increase the number of epochs during training.
- D
Reduce the complexity of the model architecture.
- E
Enable early stopping during model training.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
Overfitting occurs when a machine learning model performs well on training data but poorly on unseen data. To mitigate overfitting, strategies such as increasing the training data size, applying regularization techniques like L1 or L2, reducing model complexity, and using early stopping can be effective. However, increasing the number of training epochs typically worsens overfitting since the model has more time to memorize the training data.
- A. Correct.
Increasing the size of the training dataset can help reduce overfitting by providing the model with more examples, making it less likely to memorize the training data.
- B. Correct.
Using L1 or L2 regularization introduces a penalty for large weights, which discourages the model from overfitting to the training data.
- C. Incorrect.
Increasing the number of epochs can exacerbate overfitting, as the model may continue to learn noise or irrelevant patterns after fitting the true patterns in the data.
- D. Correct.
Reducing the complexity of the model architecture (e.g., by decreasing the number of layers or neurons) can help prevent overfitting by limiting the model's capacity to memorize the training data.
- E. Correct.
Enabling early stopping can help mitigate overfitting by halting training once the model's performance on a validation dataset stops improving.