Course menuMLA-C02

Exams / MLA-C02 / Hyperparameter tuning / Question 2

MLA-C02 practice question: Hyperparameter tuning (2 of 2)

ML Model and Foundation Model (FM) Development A free question from our original MLA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A logistics broker is tuning a gradient-boosting freight model with a budget of 60 training jobs. Its account has capacity to run 20 jobs at the same time, and the team wants the search to finish as quickly as possible.

The team wants to explore the hyperparameter space widely rather than refine one area. The algorithm reports its objective metric only when each training job finishes, so no job can be judged or stopped partway through.

Which search strategy should the team choose?

Choose one answer.

  1. A. Bayesian search, because it learns from every completed job before choosing the next settings.
  2. B. Random search, because with many jobs running in parallel it explores the space broadly and finishes sooner than a model-guided search.
  3. C. Grid search over every combination of values, because it tests each candidate setting systematically and guarantees the best settings within the 60-job budget.
  4. D. Hyperband, because it stops weak training jobs early and shifts their budget to the most promising configurations.
Show the answer and explanation

Answer: B

  • A. Wrong: Bayesian search gains most from results that arrive one or a few at a time. With 20 jobs running together, each round has little finished information to learn from.
  • B. Right: Correct. Random search picks each set of values independently of earlier results, so all 20 concurrent jobs can run without changing the quality of the search. It samples the space broadly and finishes in three rounds. Learn more: Hyperparameter tuning strategies in SageMaker AI (opens in a new tab)
  • C. Wrong: Grid search supports only categorical hyperparameters and runs one job for every combination, which quickly exceeds a 60-job budget. It does not guarantee the best settings for continuous ranges.
  • D. Wrong: Hyperband decides which jobs to stop from intermediate results reported during training. This algorithm reports its metric only at the end of each job, so Hyperband cannot do its early stopping.

Explanation

Random search chooses values independently of earlier results, so it can use full concurrency without hurting the search and explores the space broadly. Bayesian search learns from completed jobs and gains less when 20 run at once, grid search handles only categorical values, and Hyperband needs intermediate metrics to stop jobs early.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Hyperparameter tuning? The 5 full-length practice sets have 9 more Hyperparameter tuning questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets