Databricks Machine Learning Associate exam dumps

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

Select 4

You are tasked with building a machine learning pipeline using Spark ML in Databricks to predict customer churn. The dataset includes both categorical and numerical features. Which of the following steps are necessary to correctly build and configure the pipeline?

  1. A

    Use StringIndexer to encode categorical features into numerical format before including them in the pipeline.

  2. B

    Normalize numerical features using MinMaxScaler to ensure they are on the same scale.

  3. C

    Use VectorAssembler to combine all features into a single vector column named 'features'.

  4. D

    Directly pass raw categorical columns to the machine learning model without encoding.

  5. E

    Configure a Pipeline object with stages for feature transformations and the estimator.

Show answer and explanation

Correct answers: A, B, C, E

Explanation

To build a robust Spark ML pipeline in Databricks, you must preprocess categorical features using StringIndexer, normalize numerical features to ensure consistent scaling, and assemble all features into a single vector column using VectorAssembler. These transformations, along with the machine learning model, are added as stages in a Pipeline object. Raw categorical data cannot be directly used in Spark ML models, so it must be encoded beforehand.

  • A. Correct.

    Correct: StringIndexer is required to convert categorical features into numerical format, as Spark ML models cannot handle raw categorical data.

  • B. Correct.

    Correct: Normalizing numerical features using MinMaxScaler ensures that they are on the same scale, improving the performance of many machine learning models.

  • C. Correct.

    Correct: VectorAssembler is necessary to combine all transformed features into a single vector column that Spark ML models can process.

  • D. Incorrect.

    Incorrect: Spark ML models cannot work with raw categorical columns. These must be encoded into numerical format first.

  • E. Correct.

    Correct: A Pipeline object is essential in Spark ML to define the sequence of feature transformations and the machine learning model (estimator).

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