Skip to content

Instantly share code, notes, and snippets.

View mdrijwan123's full-sized avatar
🎯
Learning at the peak.

MD RIJWAN mdrijwan123

🎯
Learning at the peak.
View GitHub Profile
@mdrijwan123
mdrijwan123 / Pipeline-guide.md
Created November 14, 2019 13:53 — forked from amberjrivera/Pipeline-guide.md
Quick tutorial on Sklearn's Pipeline constructor for machine learning

If You've Never Used Sklearn's Pipeline Constructor...You're Doing It Wrong

How To Use sklearn Pipelines, FeatureUnions, and GridSearchCV With Your Own Transformers

By Emily Gill and Amber Rivera

What's a Pipeline and Why Use One?

The Pipeline constructor from sklearn allows you to chain transformers and estimators together into a sequence that functions as one cohesive unit. For example, if your model involves feature selection, standardization, and then regression, those three steps, each as it's own class, could be encapsulated together via Pipeline.

Benefits: readability, reusability and easier experimentation.