Most machine learning problems we have discussed so far consist of at least a preprocessing step and a classification step. The more complicated the problem, the longer this processing chain might get. One convenient way to glue multiple processing steps together and even use them in grid search is by using the Pipeline class from scikit-learn.
Chaining algorithms together to form a pipeline
Implementing pipelines in scikit-learn
The Pipeline class itself has a fit, a predict, and a score method, which all behave just like any other estimator in scikit-learn. The most common use case of the Pipeline class is to chain different preprocessing steps together with a supervised model like a classifier.
Let's return to the...