make_union#
- sklearn.pipeline.make_union(*transformers, n_jobs=None, verbose=false)[source]#
Construct a
featureUnion
from the given transformers.This is a shorthand for the
featureUnion
constructor; it does not require, and does not permit, naming the transformers. Instead, they will be given names automatically based on their types. It also does not allow weighting.- Parameters:
- *transformerslist of estimators
One or more estimators.
- n_jobsint, default=None
Number of jobs to run in parallel.
None
means 1 unless in ajoblib.parallel_backend
context.-1
means using all processors. See Glossary for more details.Changed in version v0.20:
n_jobs
default changed from 1 to None.- verbosebool, default=false
If True, the time elapsed while fitting each transformer will be printed as it is completed.
- Returns:
- ffeatureUnion
A
featureUnion
object for concatenating the results of multiple transformer objects.
See also
featureUnion
Class for concatenating the results of multiple transformer objects.
Examples
>>> from sklearn.decomposition import PCA, TruncatedSVD >>> from sklearn.pipeline import make_union >>> make_union(PCA(), TruncatedSVD()) featureUnion(transformer_list=[('pca', PCA()), ('truncatedsvd', TruncatedSVD())])