What is the difference between Pipeline(steps = […]) and make_pipeline(preprocessor, processor) ?
It is the same. Pipeline
allows defining a name for each step by passing a tuple (name, estimator)
. make_pipeline
will automatically define the name for each estimator, e.g. StandardScaler()
will be named "standardscaler"
.
Thus, using make_pipeline
will require a bit less code at the expense of having generic names. But it might not be an issue if we don’t use them to set parameters or inspect the pipeline.