Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 291 of 656

Databricks Certified Machine Learning Associate. Associate level, Databricks. Free question with the correct answer and a full explanation.

Databricks Machine Learning Associate Question 291

Select 3

You are tasked with building a machine learning model using Spark ML to predict house prices. After splitting the dataset into training and test sets, you decide to evaluate the model's performance using the Root Mean Squared Error (RMSE). Which of the following steps are necessary to correctly train and evaluate the model?

  1. A

    Fit the model on the training dataset using the fit() method.

  2. B

    Transform the test dataset using the model's transform() method to generate predictions.

  3. C

    Directly compute RMSE on the training dataset without using the test dataset.

  4. D

    Use the RegressionEvaluator from Spark ML to compute RMSE on the predictions.

  5. E

    Combine the training and test datasets before fitting the model to improve accuracy.

Show answer and explanation

Correct answers: A, B, D

Explanation

To properly train and evaluate a machine learning model in Spark ML, you must first train the model using the fit() method on the training dataset. Then, you should use the trained model's transform() method to generate predictions on the test dataset. Finally, evaluation metrics like RMSE should be computed using tools such as RegressionEvaluator on the test dataset's predictions. Combining training and test datasets or using the training dataset directly for evaluation would result in biased and unreliable results.

  • A. Correct.

    Correct: The fit() method is used to train the model on the training dataset, which is a required step in Spark ML.

  • B. Correct.

    Correct: The transform() method is used to generate predictions on the test dataset, which are then used for evaluation.

  • C. Incorrect.

    Incorrect: RMSE should be computed on the test dataset predictions, not directly on the training dataset, as this would lead to overfitting and incorrect evaluation.

  • D. Correct.

    Correct: The RegressionEvaluator is the proper tool in Spark ML to calculate metrics like RMSE on the predictions.

  • E. Incorrect.

    Incorrect: Combining training and test data before fitting the model violates the principle of having separate datasets for training and evaluation.

Timed practice exam

Take a Databricks Machine Learning Associate practice test under exam conditions

48 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam