Databricks Machine Learning Associate Question 203
Single answerYou are training a machine learning model in Databricks and want to optimize its performance by tuning hyperparameters. You decide to use random search as the tuning method. Which of the following statements about random search in Databricks is correct?
- A
Random search explores a predefined grid of hyperparameter combinations exhaustively.
- B
Random search randomly samples a subset of hyperparameter combinations within specified ranges.
- C
Random search guarantees finding the optimal hyperparameter combination for your model.
- D
Random search can only be used with models that have two or fewer hyperparameters.
Show answer and explanation
Correct answer: B
Explanation
Random search is a method of hyperparameter tuning that randomly samples a subset of possible hyperparameter combinations from the specified ranges or distributions. Unlike grid search, which exhaustively evaluates all combinations, random search is more efficient, especially for models with a large number of hyperparameters. While it does not guarantee finding the optimal combination, it is effective for exploring the hyperparameter space.
- A. Incorrect.
Random search does not explore a predefined grid exhaustively; this describes grid search. Random search explores a random subset of possible hyperparameter combinations.
- B. Correct.
This is correct. Random search samples hyperparameter combinations randomly within the specified ranges or distributions, offering a more efficient alternative to grid search.
- C. Incorrect.
Random search does not guarantee finding the optimal hyperparameter combination. It probabilistically explores the search space and may or may not find the best combination.
- D. Incorrect.
This is incorrect. Random search can be used with models that have any number of hyperparameters, as it samples randomly from the hyperparameter space regardless of the number of parameters.