What does Pipeline.fit_transform return when the final estimator lacks a transform method?
When building a scikit‑learn Pipeline, the final step is often a predictive estimator such as LogisticRegression that provides predict but not transform. The documentation states that Pipeline.fit_transform fits every step and, for the last step, calls fit_transform if available; otherwise it fits the step and calls transform if that method exists, raising a