Section 2 · Machine learning project
Predict the price tier of a workspace
A listing has 58 attributes and no price. Can you tell which of four price tiers it belongs to? In this section, you walk through a finished Kaggle-style project that answers with gradient-boosted trees, out-of-fold target encoding, and a macro-F1-tuned blend.
What you'll build
You follow the project from the raw CSV files to submission.csv. Along the way, you explore the data, clean it without leaking labels, engineer features, compare LightGBM, ordinal, CatBoost, and XGBoost models, validate with stratified cross-validation, and blend the results. Each lesson has figures, short code excerpts from the real notebook, interactive demos, and a quiz.
Prefer slides? Open the project slide deck.
Lessons
- Understand the problem and the dataWhat you predict, how the score works, and what is in the tables.
- Explore the dataClass balance, missing values, outliers, facilities, and geography.
- Preprocess without leakingCleaning, imputation, scaling, encoding, and the leakage rules.
- Engineer features and target encodingsCounts, facility flags, geography, and out-of-fold target features.
- Compare models, from baseline to boostingLightGBM, ordinal LightGBM, CatBoost, XGBoost, and what each added.
- Validate with cross-validation and macro F1Folds, noise, confusion matrices, and class-weight tuning on real predictions.
- Blend models and write the submissionBlending, the final weights, and the submission file.
- Review lessons learnedWins, dead ends, limitations, and a recap quiz.
Source material
Every number in this section comes from the project's notebook, its guide, the experiment logs, and the two milestone reports. Where a course script computed a figure or an experiment of its own, the text says so. The scripts live in build/.