Pipeline vs make_pipeline

Is there any difference between Pipeline and make_pipeline modules? I don’t know when I should use them.

Pipeline requires you to provide aliases to the different steps of a pipeline (as shown in the Visualizing scikit-learn pipelines in Jupyter video).

If you use make_pipeline, the alias will be set by default, for instance, to match the name of an estimator.

Because of the above, Pipeline is more flexible and can be helpful to avoid ambiguities when dealing with very complex models. In this course it probably suffices to use make_pipeline instead.

1 Like