like any other model in scikit-learn the most common use case of the pipeline class is in chaining preprocessing steps (like scaling of the datatogether with supervised model like classifier building pipelines let' look at how we can use the pipeline class to express the workflow for training an svm after scaling the data with minmaxscaler (for now without the grid searchfirstwe build pipeline object by providing it with list of steps each step is tuple containing name (any string of your choosing and an instance of an estimatorin[ ]from sklearn pipeline import pipeline pipe pipeline([("scaler"minmaxscaler())("svm"svc())]herewe created two stepsthe firstcalled "scaler"is an instance of minmaxscalerand the secondcalled "svm"is an instance of svc nowwe can fit the pipelinelike any other scikit-learn estimatorin[ ]pipe fit(x_trainy_trainherepipe fit first calls fit on the first step (the scaler)then transforms the training data using the scalerand finally fits the svm with the scaled data to evaluate on the test datawe simply call pipe scorein[ ]print("test score{ }format(pipe score(x_testy_test))out[ ]test score calling the score method on the pipeline first transforms the test data using the scalerand then calls the score method on the svm using the scaled test data as you can seethe result is identical to the one we got from the code at the beginning of the when doing the transformations by hand using the pipelinewe reduced the code needed for our "preprocessing classificationprocess the main benefit of using the pipelinehoweveris that we can now use this single estimator in cross_val_score or gridsearchcv with one exceptionthe name can' contain double underscore__ algorithm chains and pipelines