Databricks Machine Learning Associate exam dumps

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

Select 2

You are training a machine learning model using Spark ML in Databricks. You first apply a StringIndexer to your categorical column to convert it into numeric values and then use a LogisticRegression model for training. In this workflow, which of the following correctly describes the roles of the StringIndexer and LogisticRegression components?

  1. A

    StringIndexer is an Estimator because it learns how to map string categories to numeric values.

  2. B

    StringIndexer is a Transformer because it directly transforms the input data without learning any parameters.

  3. C

    LogisticRegression is an Estimator because it needs to fit a model to the training data.

  4. D

    LogisticRegression is a Transformer because it only transforms input data without learning any parameters.

  5. E

    Both StringIndexer and LogisticRegression are Transformers because they only apply transformations to the data.

Show answer and explanation

Correct answers: A, C

Explanation

In Spark ML, an Estimator is an abstraction that learns parameters from data during the fit process, such as StringIndexer learning the mapping of categories to numbers or LogisticRegression learning model coefficients. A Transformer, on the other hand, applies transformations directly to the data without learning new parameters. StringIndexer and LogisticRegression are both Estimators because they require a fit process to learn parameters before applying transformations.

  • A. Correct.

    StringIndexer is an Estimator because it computes and learns the mapping from string categories to numeric values during the fit process. This mapping is then applied to data during transformation.

  • B. Incorrect.

    This is incorrect because StringIndexer does not directly transform input data; it first learns the mapping (parameters) during the fit process, which makes it an Estimator.

  • C. Correct.

    LogisticRegression is an Estimator because it requires training to learn the coefficients of the regression model during the fit process.

  • D. Incorrect.

    This is incorrect because LogisticRegression learns a model (parameters) during training, which makes it an Estimator, not just a Transformer.

  • E. Incorrect.

    This is incorrect because while both components can eventually transform data, they involve learning parameters (in the case of StringIndexer and LogisticRegression) and are thus not just Transformers.

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