November 2017
Intermediate to advanced
374 pages
10h 19m
English
Hopefully it was obvious, but each step in a pipeline is passed to a pipeline object via a list of tuples, with the first element getting the name and the second getting the actual object. Under the hood, these steps are looped through when a method such as fit_transform is called on the pipeline object.
This said, there are quick and dirty ways to create a pipeline, much in the same way there was a quick way to perform scaling, though we can use StandardScaler if we want more power. The pipeline function will automatically create the names for the pipeline objects:
pipe2 = pipeline.make_pipeline(imputer, pca)pipe2.steps [('imputer', Imputer(axis=0, copy=True, missing_values='NaN', strategy='mean', verbose=0)), ('pca', PCA(copy=True, ...Read now
Unlock full access