Databricks-Machine-Learning-Associate: Certified Machine Learning Associate
Free Practice Exam Questions (page: 11)
Updated On: 2-Jan-2026

A data scientist uses 3-fold cross-validation when optimizing model hyperparameters for a regression problem. The following root-mean-squared-error values are calculated on each of the validation folds:
· 10.0
· 12.0
· 17.0
Which of the following values represents the overall cross-validation root-mean-squared error?

  1. 13.0
  2. 17.0
  3. 12.0
  4. 39.0
  5. 10.0

Answer(s): A

Explanation:

To calculate the overall cross-validation root-mean-squared error (RMSE), you average the RMSE values obtained from each validation fold. Given the RMSE values of 10.0, 12.0, and 17.0 for the three folds, the overall cross-validation RMSE is calculated as the average of these three values:
OverallCVRMSE=10.0+12.0+17.03=39.03=13.0OverallCVRMSE=310.0+12.0+17.0=339.0=13.0 Thus, the correct answer is 13.0, which accurately represents the average RMSE across all folds.


Reference:

Cross-validation in Regression (Understanding Cross-Validation Metrics).



A machine learning engineer is trying to scale a machine learning pipeline pipeline that contains multiple feature engineering stages and a modeling stage. As part of the cross-validation process, they are using the following code block:



A colleague suggests that the code block can be changed to speed up the tuning process by passing the model object to the estimator parameter and then placing the updated cv object as the final stage of the pipeline in place of the original model.

Which of the following is a negative consequence of the approach suggested by the colleague?

  1. The model will take longer to train for each unique combination of hvperparameter values
  2. The feature engineering stages will be computed using validation data
  3. The cross-validation process will no longer be
  4. The cross-validation process will no longer be reproducible
  5. The model will be refit one more per cross-validation fold

Answer(s): B

Explanation:

If the model object is passed to the estimator parameter of CrossValidator and the cross-validation object itself is placed as a stage in the pipeline, the feature engineering stages within the pipeline would be applied separately to each training and validation fold during cross-validation. This leads to a significant issue: the feature engineering stages would be computed using validation data, thereby leaking information from the validation set into the training process. This would potentially invalidate the cross-validation results by giving an overly optimistic performance estimate.


Reference:

Cross-validation and Pipeline Integration in MLlib (Avoiding Data Leakage in Pipelines).



What is the name of the method that transforms categorical features into a series of binary indicator feature variables?

  1. Leave-one-out encoding
  2. Target encoding
  3. One-hot encoding
  4. Categorical
  5. String indexing

Answer(s): C

Explanation:

The method that transforms categorical features into a series of binary indicator variables is known as one-hot encoding. This technique converts each categorical value into a new binary column, which is essential for models that require numerical input. One-hot encoding is widely used because it helps to handle categorical data without introducing a false ordinal relationship among categories.


Reference:

Feature Engineering Techniques (One-Hot Encoding).



A data scientist wants to parallelize the training of trees in a gradient boosted tree to speed up the training process. A colleague suggests that parallelizing a boosted tree algorithm can be difficult.
Which of the following describes why?

  1. Gradient boosting is not a linear algebra-based algorithm which is required for parallelization
  2. Gradient boosting requires access to all data at once which cannot happen during parallelization.
  3. Gradient boosting calculates gradients in evaluation metrics using all cores which prevents parallelization.
  4. Gradient boosting is an iterative algorithm that requires information from the previous iteration to perform the next step.

Answer(s): D

Explanation:

Gradient boosting is fundamentally an iterative algorithm where each new tree is built based on the errors of the previous ones. This sequential dependency makes it difficult to parallelize the training of trees in gradient boosting, as each step relies on the results from the preceding step. Parallelization in this context would undermine the core methodology of the algorithm, which depends on sequentially improving the model's performance with each iteration.


Reference:

Machine Learning Algorithms (Challenges with Parallelizing Gradient Boosting).

Gradient boosting is an ensemble learning technique that builds models in a sequential manner. Each new model corrects the errors made by the previous ones. This sequential dependency means that each iteration requires the results of the previous iteration to make corrections. Here is a step-by- step explanation of why this makes parallelization challenging:
Sequential Nature: Gradient boosting builds one tree at a time. Each tree is trained to correct the residual errors of the previous trees. This requires the model to complete one iteration before starting the next.
Dependence on Previous Iterations: The gradient calculation at each step depends on the predictions made by the previous models. Therefore, the model must wait until the previous tree has been fully trained and evaluated before starting to train the next tree. Difficulty in Parallelization: Because of this dependency, it is challenging to parallelize the training process. Unlike algorithms that process data independently in each step (e.g., random forests),

gradient boosting cannot easily distribute the work across multiple processors or cores for simultaneous execution.
This iterative and dependent nature of the gradient boosting process makes it difficult to parallelize effectively.
Reference
Gradient Boosting Machine Learning Algorithm
Understanding Gradient Boosting Machines



Viewing page 11 of 20
Viewing questions 41 - 44 out of 140 questions



Post your Comments and Discuss Databricks Databricks-Machine-Learning-Associate exam prep with other Community members:

Databricks-Machine-Learning-Associate Exam Discussions & Posts