- sklearn.pipeline.make_pipeline(*steps, memory=None, verbose=False)¶
Pipelinefrom the given estimators.
This is a shorthand for the
Pipelineconstructor; it does not require, and does not permit, naming the estimators. Instead, their names will be set to the lowercase of their types automatically.
- *stepslist of Estimator objects
List of the scikit-learn estimators that are chained together.
- memorystr or object with the joblib.Memory interface, default=None
Used to cache the fitted transformers of the pipeline. By default, no caching is performed. If a string is given, it is the path to the caching directory. Enabling caching triggers a clone of the transformers before fitting. Therefore, the transformer instance given to the pipeline cannot be inspected directly. Use the attribute
stepsto inspect estimators within the pipeline. Caching the transformers is advantageous when fitting is time consuming.
- verbosebool, default=False
If True, the time elapsed while fitting each step will be printed as it is completed.
Returns a scikit-learn
Class for creating a pipeline of transforms with a final estimator.
>>> from sklearn.naive_bayes import GaussianNB >>> from sklearn.preprocessing import StandardScaler >>> from sklearn.pipeline import make_pipeline >>> make_pipeline(StandardScaler(), GaussianNB(priors=None)) Pipeline(steps=[('standardscaler', StandardScaler()), ('gaussiannb', GaussianNB())])