🗒 Cheat Sheet← Lesson
BitWithBite
AI & Machine Learning Worksheet

🤖 Building a Full Pipeline

Chapter: AI & Machine Learning · Level ★★☆ · Time: 30 min
SCORE___ / 20
NameClassDate
After this worksheet you can
ColumnTransformer for mixed dataCombine numeric + categoricalFit once, predict anywhereGrid-search a pipeline
📚 Quick Recap

You've seen estimators, transformers, and basic pipelines. Now you'll build one that handles a realistic dataset — mixed numeric and categorical columns, missing values, and a final model — all wrapped in a single object you could deploy tomorrow.

🧠 Section A · Concept Check ● BEGINNER 4 × 1 = 4

1Different preprocessing per column type uses:
2A pipeline guarantees test data gets:
3Pipeline step params are tuned as:
4pipe.predict runs preprocessing:

🧮 Section B · Problem Solving ● INTERMEDIATE 2 + 3×3 = 11

5Transformer routes columns to the right prep.
6Numeric columns get a scaler; categorical get an .
7Sketch a ColumnTransformer for [age, salary] + [city].
8Why grid-search the whole pipeline, not just the model?
9What breaks if you scale before splitting?

🚀 Section C · Challenge ● CHALLENGE 5

10Name the two big wins of pipelines.
💭 Reflection — the most useful thing I learned:
A ___/4   B ___/11   C ___/5   Total ___/20 Teacher's Signature Parent's Signature
✂ answer key — fold or cut before handing out

1-A   2-A   3-A   4-A  |  5 Column   6 encoder   7 = ColumnTransformer([('num', StandardScaler(), ['age','salary']), ('cat', OneHotEncoder(), ['city'])])   8 = CV folds re-fit preprocessing per split - no leakage   9 = Test stats leak into training - overly optimistic scores  |  10 = No leakage + reproducible single object to deploy

📄 Need offline practice?Download the print-ready PDF or open the one-page cheat sheet.
⬇ Worksheet PDF 🗒 Cheat Sheet