Databricks Machine Learning Associate Question 240
Single answerYou are using Databricks MLlib to perform hyperparameter tuning on a machine learning model. You have specified 3 values for the learning rate, 2 values for the batch size, and 4 values for the number of trees in a random forest model. How many models will be trained during this process?
- A
9
- B
12
- C
24
- D
36
Show answer and explanation
Correct answer: C
Explanation
The total number of models trained during hyperparameter tuning is calculated by multiplying the number of specified values for each hyperparameter. In this case, there are 3 values for the learning rate, 2 values for the batch size, and 4 values for the number of trees, resulting in 3 × 2 × 4 = 24 models.
- A. Incorrect.
Incorrect: 9 is the result of multiplying only two parameters (e.g., 3 values for learning rate and 3 for batch size). However, there are three parameters in total.
- B. Incorrect.
Incorrect: 12 does not represent the total combination of the three hyperparameters (3 × 2 × 4 = 24).
- C. Correct.
Correct: 24 is the total number of models trained, as it is the product of the combinations of all three hyperparameters (3 learning rates × 2 batch sizes × 4 number of trees).
- D. Incorrect.
Incorrect: 36 overestimates the number of models trained in this scenario.