Databricks Machine Learning Associate Question 241
Single answerA data scientist is using Databricks AutoML to train a regression model for predicting house prices. The dataset contains 3 categorical features, each with 4 unique categories, and 5 numerical features. During the training process, how many models will be trained if hyperparameter tuning is enabled with 3-fold cross-validation?
- A
3 models
- B
12 models
- C
36 models
- D
108 models
Show answer and explanation
Correct answer: D
Explanation
When hyperparameter tuning is enabled in Databricks AutoML, multiple models are trained for each hyperparameter configuration. In this scenario, with 3-fold cross-validation and 12 hyperparameter configurations being tested, 12 models are trained per fold, and there are 3 folds. The total number of models trained is 12 x 3 x 3 = 108.
- A. Incorrect.
Incorrect. This assumes only 1 model was trained per fold of cross-validation, without considering hyperparameter tuning.
- B. Incorrect.
Incorrect. This assumes only 3 categorical features are being used without accounting for cross-validation folds or hyperparameter tuning.
- C. Incorrect.
Incorrect. This considers the cross-validation folds but not the number of hyperparameter tuning runs for each model.
- D. Correct.
Correct. With hyperparameter tuning, multiple configurations are tested. For every fold in 3-fold cross-validation, multiple models are trained. If 12 hyperparameter configurations are tested, 12 x 3 = 36 models are trained in each fold, resulting in 108 models in total across all folds.