Databricks Machine Learning Associate Question 560
Select 3You are building a machine learning pipeline in Databricks, and you need to handle data preprocessing and model training. Which of the following correctly distinguishes the roles of estimators and transformers in this pipeline?
- A
Estimators are used during the training phase to learn parameters from the data.
- B
Transformers are used to apply a learned transformation to new data.
- C
Estimators always return a model, which is a type of transformer, after being fit to the data.
- D
Transformers can be fit to the data to learn parameters.
- E
Estimators can directly transform new data without fitting.
Show answer and explanation
Correct answers: A, B, C
Explanation
Estimators are responsible for learning parameters or models from data during the training phase, while transformers are used to apply these learned transformations to new data. In a Databricks pipeline, estimators are fit to the data, producing transformers or models that can then be applied for tasks such as preprocessing or prediction.
- A. Correct.
Correct: Estimators are designed to learn parameters from data, such as training a machine learning model or computing a statistical metric. They are a key component during the training phase.
- B. Correct.
Correct: Transformers are used to apply transformations, such as scaling or encoding, to new data after they have been fit (if necessary). This is their primary role in pipelines.
- C. Correct.
Correct: Once an estimator is fit to the data, it produces a model, which is a type of transformer that can then transform new data.
- D. Incorrect.
Incorrect: Transformers do not learn parameters themselves; they apply transformations based on parameters learned by an estimator (if applicable).
- E. Incorrect.
Incorrect: Estimators cannot directly transform data. They must first be fit to the data to produce a model or transformer capable of performing transformations.