- Block 18 — Professional pipelines
- Objective
- show with measured figures that
Pipeline is a structural
guarantee against preprocessing leakage rather than a convenience; build a
classification pipeline step by step, measuring each addition; inspect a fitted
pipeline through named_steps and get_feature_names_out; know which methods a
pipeline exposes and why; tune the whole chain with GridSearchCV and the
step__parameter convention, preprocessing decisions included; fit the decision
threshold with TunedThresholdClassifierCV on inner folds; cache expensive
preprocessing with memory=; write stateless and stateful custom transformers;
keep column names alive with set_output; serialize pipeline, threshold and
contract together; and diagnose five failures, each with its real traceback. - Estimated duration
- 120 minutes
- Prerequisites
- chapters 018 and 019 (missing values, imputation), 022
(categorical encoding), 023 (feature scaling), 025 (feature selection), 026 and
027 (splitting, stratification, groups, time), 028 (data leakage), 029 (
fit,
predict, predict_proba), 034 (cross-validation), 035 (tuning), 036 (logistic
regression), 050 and 051 (class imbalance), 052 (confusion matrix), 062
(threshold), 063 and 064 (ROC-AUC, PR-AUC), 075 (choosing the metric) - Associated quizzes
076.1-quiz-the-structural-guarantee.md to
076.9-quiz-debugging-a-pipeline.md