Build production-quality, reproducible models with scikit-learn by tuning hyperparameters correctly and wrapping every preprocessing step and estimator inside a single Pipeline. You will learn to search the hyperparameter space with cross-validation, avoid data leakage, and persist the best model for deployment.
Watch the free preview
Parameters vs hyperparameters — free to watch, no account needed.
What you'll learn
- Build production-quality, reproducible models with scikit-learn Pipelines and cross-validated hyperparameter tuning
- Distinguish learned model parameters from hyperparameters you must set before training
- Search hyperparameter spaces efficiently with GridSearchCV and RandomizedSearchCV
- Combine preprocessing and estimators into one Pipeline and ColumnTransformer
- Prevent data leakage during tuning and persist the best model for deployment
Syllabus
Parameters, Hyperparameters & Honest Validation
Parameters vs hyperparametersFree preview
Cross-validation for honest tuning
Searching the Hyperparameter Space
Exhaustive search with GridSearchCV
Sampling the space with RandomizedSearchCV
Pipelines — Combining Preprocessing and Models
Building a scikit-learn Pipeline
Heterogeneous data with ColumnTransformer
Leakage-Free Tuning & Saving the Best Model
Avoiding data leakage during tuning
Saving the best model reproducibly
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10