Databricks Machine Learning Associate exam dumps

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

Select 4

You are tasked with building a machine learning pipeline in Databricks using Spark ML to predict customer churn. The pipeline should include stages for data preparation, feature transformation, and model training. Which of the following components can be included as valid stages in a Spark ML Pipeline?

  1. A

    VectorAssembler for combining feature columns into a single feature vector

  2. B

    StringIndexer for converting categorical labels into numeric indices

  3. C

    LinearRegression for training a regression model

  4. D

    Pandas DataFrame for performing data transformations

  5. E

    OneHotEncoder for encoding categorical features

  6. F

    SQL queries for data preparation within the pipeline stages

Show answer and explanation

Correct answers: A, B, C, E

Explanation

Spark ML Pipelines consist of a sequence of stages, where each stage is either a Transformer (e.g., VectorAssembler, StringIndexer, OneHotEncoder) or an Estimator (e.g., LinearRegression). These stages operate on Spark DataFrames and are designed to work seamlessly within the pipeline framework. Pandas DataFrames and SQL queries, while useful for data manipulation, are not valid pipeline stages.

  • A. Correct.

    VectorAssembler is a valid Spark ML Pipeline stage used for combining multiple feature columns into a single vector, which is required by Spark ML algorithms.

  • B. Correct.

    StringIndexer is a valid Spark ML Pipeline stage used to convert categorical labels into numeric indices, a common preprocessing step in machine learning pipelines.

  • C. Correct.

    LinearRegression is a valid Spark ML Pipeline stage as it is a machine learning algorithm included in Spark ML for regression tasks.

  • D. Incorrect.

    Pandas DataFrame is not a valid Spark ML Pipeline stage because Spark ML pipelines operate on Spark DataFrames, not Pandas DataFrames.

  • E. Correct.

    OneHotEncoder is a valid Spark ML Pipeline stage for encoding categorical features as one-hot vectors, which is often used in feature transformation.

  • F. Incorrect.

    SQL queries are not directly supported as stages within Spark ML Pipelines, although SQL queries can be used outside the pipeline to prepare data.

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