You want PCA features and selected original features from the same matrix. How does FeatureUnion differ from a…
Classic MLLevel: IntermediateMultiple views of the same inputs
You want PCA features and selected original features from the same matrix. How does FeatureUnion differ from a sequential pipeline?
Hints
- Parallel views versus a transformation chain.
- Concatenation increases feature width.
Answer
It fits independent transformer branches on the same input and concatenates their outputs. A sequential pipeline would feed one representation into the next, losing the independent branches.
Source and licence: scikit-learn 1.7.2 — compose · BSD-3-Clause · answer: Quantoros editorial