Custom transformer mixin with FeatureUnion in scikit-learn
问题 I am writing custom transformers in scikit-learn in order to do specific operations on the array. For that I use inheritance of class TransformerMixin. It works fine when I deal only with one transformer. However when I try to chain them using FeatureUnion (or make_union), the array is replicated n-times. What could I do to avoid that? Am I using scikit-learn as it is supposed to be? import numpy as np from sklearn.base import TransformerMixin from sklearn.pipeline import FeatureUnion #