MLA-C01 Question 188
Single answerYou are building a machine learning model on AWS SageMaker for a classification problem. You want to optimize the model's hyperparameters to achieve the best performance. The dataset is large, and training the model is computationally expensive. Which hyperparameter tuning technique should you choose to efficiently explore the hyperparameter space while balancing computational cost?
- A
Grid search
- B
Random search
- C
Bayesian optimization
- D
Manual tuning
Show answer and explanation
Correct answer: C
Explanation
Bayesian optimization is the best choice for this scenario because it models the performance of hyperparameters based on past evaluations and focuses search efforts on the most promising regions of the hyperparameter space. This makes it efficient for optimizing hyperparameters in computationally expensive problems, unlike grid search or random search which do not leverage prior knowledge. Manual tuning is not recommended due to its inefficiency and potential for human error.
- A. Incorrect.
Grid search exhaustively searches over all possible combinations of hyperparameters in the search space. While it guarantees finding the optimal hyperparameters, it is computationally expensive, especially with a large dataset, and not efficient for this scenario.
- B. Incorrect.
Random search selects random combinations of hyperparameters to evaluate. It is more efficient than grid search but still does not prioritize exploring promising regions of the search space based on past evaluations.
- C. Correct.
Bayesian optimization uses previous results to model the performance of hyperparameters and focuses on exploring the most promising regions of the hyperparameter space. This makes it computationally efficient and well-suited for scenarios where training is expensive.
- D. Incorrect.
Manual tuning requires manually selecting and testing hyperparameters. It is time-consuming, error-prone, and not scalable for large datasets or complex problems.