Workspace Price Tiers the competition, step by step

The roadmap: how to do this project, step by step

This is the order to work in, for this competition or any tabular ML project. Each step links to the lesson that shows it with real code.

1. Understand the problem (before touching code)

  • What is one row? One workspace listing.
  • What do we predict? price_tier, 1 (cheapest) to 4 (most expensive). That's multiclass classification, and the classes are ordered.
  • How are we scored? Macro F1: compute F1 for each tier, then average. A tier the model ignores pulls the score down, even if it's rare.
  • What can't we use? External data, AutoML, deep-learning frameworks (project rules). Everything has to run inside the notebook.

2. Explore the data → Lesson 2: EDA

Look at the target, missing values, the strongest columns, and how train and test differ. In this competition that last question turned out to be the most important one: Kaggle split train and test by operator.

3. Get a baseline and a trustworthy validation → Lesson 0, Lesson 1

  • A first model gives you a number to beat.
  • The validation must imitate how the test set was made. Here that means folds grouped by operator. Random folds gave 0.758; the leaderboard gave 0.70. Grouped folds gave ≈0.70, so they're the ruler we trust.

4. Preprocess and engineer features → Lesson 3

Encode categories, decide on missing values and scaling, then add features that carry new information: size ratios, location (neighbours, distance to centres), the operator's profile (no labels), and out-of-fold target encodings.

5. Test ideas one at a time → Lesson 4

Every idea is a hypothesis. Measure it on grouped CV and keep it only if it beats the noise (about ±0.002 here). Most ideas don't.

6. Compare model families → Lesson 5

A simple baseline (Logistic Regression in a scaled pipeline) next to gradient boosting (XGBoost, CatBoost) and a regression model that uses the tier order. Write down the pros and cons of each; the viva asks.

7. Combine → Lesson 6, Lesson 7

  • Blend models (they make different mistakes).
  • Operator smoothing: all of a test operator's listings are in the test set together, so average predictions across them.
  • Decode for the metric: tune class weights or cut-points for macro F1, scored with cross-fitting so tuning can't cheat.

8. Submit and analyse errors → Lesson 8, Lesson 9

Submit the scenario with the best grouped CV, not the one with the best public leaderboard score. Then study the confusion matrix: where are the mistakes, and why?

How this maps to the viva checklist

checklist item where it's covered
problem statement & data loading Lesson 1
EDA (univariate + bivariate, visuals) Lesson 2
missing values, scaling, encoding, reusable pipelines Lesson 3 (and the LR pipeline in Lesson 5)
feature engineering + importance Lessons 3, 4, 5c
≥ 3 model families, tuning, comparison, pros/cons Lesson 5
error / performance analysis Lesson 9
best model in the notebook Lessons 7–8