Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 290 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 290

Select 3

You are tasked with building a machine learning model to predict customer churn using Spark ML in Databricks. After preprocessing the data, you split it into training and test datasets. You then train a logistic regression model on the training dataset and evaluate its performance using the test dataset. Which of the following steps are necessary to correctly train and evaluate the model?

  1. A

    Split the dataset into training and test sets using randomSplit.

  2. B

    Fit the logistic regression model on the test dataset.

  3. C

    Use BinaryClassificationEvaluator to compute the evaluation metric on the test dataset.

  4. D

    Transform the test dataset using the trained logistic regression model.

  5. E

    Normalize the features using VectorAssembler after splitting the dataset.

Show answer and explanation

Correct answers: A, C, D

Explanation

To correctly train and evaluate a machine learning model using Spark ML, the dataset must be split into training and test sets. The model is trained on the training set and evaluated on the test set. Key steps include transforming the test dataset using the trained model and using appropriate evaluators like BinaryClassificationEvaluator to compute evaluation metrics. Proper preprocessing, such as normalization, should occur before splitting the data to avoid inconsistencies.

  • A. Correct.

    Correct. Splitting the dataset into training and test sets using randomSplit is a common and necessary step to ensure the model is trained on one part of the data and evaluated on another.

  • B. Incorrect.

    Incorrect. The model should be fit on the training dataset, not the test dataset. Fitting the model on the test set would lead to data leakage and invalidate the evaluation.

  • C. Correct.

    Correct. BinaryClassificationEvaluator is used to compute evaluation metrics like AUC or accuracy on the test dataset, which is a critical step in evaluating model performance.

  • D. Correct.

    Correct. After training the model, you must transform the test dataset using the trained logistic regression model to generate predictions. These predictions are then used for evaluation.

  • E. Incorrect.

    Incorrect. Feature normalization (e.g., using VectorAssembler) should be applied before splitting the dataset to ensure consistency across subsets. Normalizing after splitting may lead to discrepancies between training and test sets.

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