Databricks Machine Learning Associate Question 242
Single answerYou are using Databricks AutoML to train a machine learning model for a classification problem. The dataset contains a categorical feature with 5 unique values. During preprocessing, Databricks automatically performs one-hot encoding on this feature. How many models will be trained by AutoML if you enable hyperparameter tuning with 3-fold cross-validation?
- A
3 models
- B
5 models
- C
15 models
- D
45 models
Show answer and explanation
Correct answer: C
Explanation
When AutoML is applied, Databricks automatically handles preprocessing steps like one-hot encoding for categorical features. The number of models trained is influenced by the number of hyperparameter configurations and the cross-validation folds. In this case, with 3-fold cross-validation and 5 hyperparameter configurations, the total models trained would be 5 configurations × 3 folds = 15 models.
- A. Incorrect.
Incorrect: 3 models would only be trained if there were no hyperparameter tuning or cross-validation applied.
- B. Incorrect.
Incorrect: 5 models would only be trained if there were no cross-validation and hyperparameter tuning was limited to a single configuration for each base model.
- C. Correct.
Correct: 15 models are trained because Databricks AutoML trains one base model per hyperparameter configuration for each fold in the 3-fold cross-validation process. Assuming 5 hyperparameter configurations, this results in 5 configurations × 3 folds = 15 models.
- D. Incorrect.
Incorrect: 45 models assumes there are 15 hyperparameter configurations being tested across 3 folds, which is not specified in this scenario.