MLA-C01 Question 206
Select 2You are designing a machine learning workflow using AWS services to build, train, and deploy a model for predicting customer churn. During the training phase, you notice that your model's performance is inconsistent across different training runs, even with the same hyperparameter settings. Which of the following steps can help mitigate this issue?
- A
Set a random seed in the training script to ensure consistent initialization of weights and data splitting.
- B
Use SageMaker Debugger to identify potential data quality issues and inconsistencies in the training dataset.
- C
Increase the number of epochs to ensure the model is trained sufficiently in each run.
- D
Enable automatic model tuning (hyperparameter optimization) in SageMaker to optimize hyperparameters across runs.
- E
Ensure the training data is shuffled consistently before each training run.
Show answer and explanation
Correct answers: A, E
Explanation
Inconsistent model performance across training runs often arises from randomness in operations such as weight initialization and data shuffling. Setting a random seed ensures reproducibility by controlling these random processes. Additionally, consistently shuffling training data ensures that the model observes the same data ordering in each run, further reducing variability.
- A. Correct.
Setting a random seed ensures that operations with randomness, such as weight initialization and data splitting, are consistent across training runs. This is a direct and effective way to mitigate inconsistent results.
- B. Incorrect.
Using SageMaker Debugger is useful for identifying data quality issues but does not directly address inconsistencies caused by randomness in training runs.
- C. Incorrect.
Increasing the number of epochs does not mitigate inconsistencies caused by randomness. It may improve model performance, but the results will still vary without controlling for randomness.
- D. Incorrect.
Automatic model tuning optimizes hyperparameters but does not resolve inconsistencies caused by random initialization or data shuffling across runs.
- E. Correct.
Shuffling the training data consistently ensures that the model sees data in the same order during training, reducing variability caused by data ordering.