Data Preparation & Feature Engineering
Turn raw tabular data into model-ready features with reusable scikit-learn pipelines that apply identical transformations in training and inference.
4 objectives 6 steps about 135 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Audit a raw dataset for missing values, invalid entries, duplicates, outliers and columns that would not be available at prediction time.
- Choose and apply imputation, categorical encoding (one-hot, ordinal, target) and scaling strategies appropriate to the model family.
- Engineer features from dates, free text and group aggregates computed only from data available at each prediction time (point-in-time-correct as-of joins), and keep only those that improve cross-validated scores.
- Package all preprocessing in a Pipeline with a ColumnTransformer that is fit on training data only and handles unseen categories and missing values at inference.
Lesson plan
6 steps, about 135 min · 5 of 5 lessons available so far
- Auditing Raw Data Before You Model Concept · 20 min
- Imputation, Encoding and Scaling, Chosen by Model Family Concept · 25 min
- Worked Example: Features from Timestamps, Text and Group Aggregates Worked example · 25 min
- Lab: One Pipeline from Raw Rows to Predictions Lab · 30 min
- Worked Example: Building a Point-in-Time-Correct Training Set Worked example · 20 min
- Check: Preparing Data the Same Way Twice Knowledge check · 8 questions
Practise it
Build a ColumnTransformer pipeline for a mixed-type dataset (numeric, categorical, datetime, free text), add at least two engineered features and show their effect on cross-validated scores, and write a test proving the fitted pipeline predicts on raw rows that contain an unseen category and missing values.
References
Hard prerequisites
None.
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.