A teaching walkthrough
Predicting house price tiers
545 houses, 3 price tiers (budget / mid / premium). The same workflow you'd use in a real Kaggle competition, one step at a time. Every page shows the explanation next to the exact code that was run and its real output.
Explore the data
Look before you model: size, missing values, the target, what drives price.
02First submission
A dumb baseline and a first Random Forest. Why the training score lies.
03Honest validation
Hold-out, overfitting curves, repeated K-fold. The score you can trust.
04Feature engineering
New columns, an experiment log, and the data-leakage trap.
05Models & tuning
Five model families, early stopping, regularisation, the ordinal trick.
06Blend & final reveal
Averaging models, then the private leaderboard is revealed.
Where we ended up
| submission | CV | private leaderboard |
|---|---|---|
| Always guess "budget" | โ | 0.293 |
| First Random Forest | 0.696 | 0.653 |
| Leaky feature (looked best!) | 0.800 | 0.453 |
| Final blend of 5 models | 0.738 | 0.747 |
The two lessons that matter most: trust honest cross-validation (lesson 3) and watch out for leakage (lesson 4).