A data scientist builds a scikit-learn Pipeline with several preprocessing steps and one final learning step. Which rule about pipeline steps is correct?
Answer & explanation
Correct answer: D
WHY D: In a standard Pipeline, all intermediate steps must be transformers, while the final step can be a predictor or other estimator. WHY NOT A: Preprocessing steps do not need predict_proba. WHY NOT B: Multiple intermediate transforms are allowed. WHY NOT C: Pipeline steps follow estimator interfaces, not arbitrary function signatures. WHY NOT E: Parallel branches require a different composite estimator such as ColumnTransformer or FeatureUnion.