Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Databricks Certified Machine Learning Associate · Databricks
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- Correct answer : A — Every step before the last one must implement `fit` and `transform` so its output can feed the next step, while only the final step is allowed to be a plain estimator like a classifier. A . This is correct: scikit-learn's `Pipeline` contract requires every step except the last to implement both `fit` and `transform`, because each step's transformed output becomes the next step's input, and only the final step is allowed to be a non-transformer such as a classifier or regressor. B . This is backwards; `Pipeline` does not require the last step to implement `transform` at all. When the last step is a classifier like `LogisticRegression`, the pipeline exposes `predict` instead, and calling `.transform()` on it raises an `AttributeError`. C . This misstates the rule: it is every step except the last that needs `transform`, not just the first, and `LogisticRegression` is deliberately exempt from implementing `transform` precisely because it is the final estimator that produces predictions. D . `Pipeline` executes its steps sequentially, not in parallel; each step's `fit_transform` output is passed directly as the input to the next step, which is exactly why `PCA` operates on the scaled output of `StandardScaler` rather than on raw features.