dtoolkit.pipeline.make_union#

dtoolkit.pipeline.make_union(*transformers: list[Transformer], n_jobs: int = None, verbose: bool = False) FeatureUnion[source]#

Construct a FeatureUnion from the given transformers.

See also

FeatureUnion

Class for concatenating the results of multiple transformer objects.

Notes

Different to sklearn.pipeline.make_union. This would let DataFrame in and DataFrame out.

Examples

>>> from sklearn.decomposition import PCA, TruncatedSVD
>>> from dtoolkit.pipeline import make_union
>>> make_union(PCA(), TruncatedSVD())
FeatureUnion(transformer_list=[('pca', PCA()),
                              ('truncatedsvd', TruncatedSVD())])