J. Bernardi

Project · Tabular · 2024 · team of four

Real-estate price prediction

Predicting French property prices from 40,000 incomplete listings, with nearest-neighbour imputation and a tuned XGBoost regressor.

A house in cross-section, with its rooms, surfaces and energy rating dimensioned like a surveyor's drawing; only the price is left unmeasured.

Problem

Predict a property’s price from its listing (ENS Challenge Data no. 68): city, type, surfaces, rooms, energy and greenhouse-gas ratings, orientation. The target is widely dispersed and the inputs are incomplete: CITY alone has about 8,000 distinct values, and more than 18,000 listings have no energy rating.

Method

Ordinal ratings were label-encoded and nominal variables one-hot encoded. Missing surfaces and room counts were filled with a K-nearest-neighbours imputer. Linear regression, KNN and a random forest were compared with XGBoost, which was tuned with GridSearchCV (1,600 trees, depth 10, learning rate 0.04).

Results

XGBoost was the strongest model of the four. Adding listing photos as inputs did not improve the score.

Stack

Python · XGBoost · scikit-learn · pandas · Jupyter

Small print

Keyboard & errata

g i
Go to the index
g w
Go to work
g p
Go to the field log
g a
Go to about
g o
Go to now
t
Paper / darkroom
[ ]
Previous / next project
?
This sheet
  1. Index For “models taken apart”, read “models that took me apart, a little, each time”.
  2. GANs Some rejected digits were, on reflection, perfectly good digits.
  3. Work The list shows every project but one. See the missing one →