Downloads · 30 days
0
danielalonk/melbourne-housing-price-predictor
melbourne-housing-price-predictor is a machine learning model from danielalonk. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated May 7, 2026
Repo size
586 MB
Likes
0
Public
Click a slice to open those files.
.pkl174 MB · 70%
From the Hugging Face model README
This project predicts property prices in Melbourne, Australia using machine learning.
The dataset contains 18,396 real estate transactions with features like location, size, type...
| Property | Details |
|---|---|
| Source | Kaggle — Melbourne City Property Sales |
| Rows | 18,396 |
| Features | 22 original |
| Target (Regression) | Price (AUD) |
| Target (Classification) | 0=Affordable, 1=Mid-Range, 2=Premium |




feature importance based on first linear model (trained by 80/20 method)

New features created to improve model performance:
| Feature | Description |
|---|---|
bedroom2 | removed |
property_count | removed |
Property_Age | 2025 - YearBuilt |
Area_per_Room | BuildingArea / Rooms |
Type_h / Type_t / Type_u | One-hot encoding of property type |
Market_Cluster | K-Means cluster (4 clusters) |
Dist_to_Centroid | Distance to K-Means centroid |

Used K-Means with K=4 (selected via Elbow Method) on features: Distance, BuildingArea, Rooms, Property_Age.

| Cluster | Description |
|---|---|
| 0 | Small properties close to the city center |
| 1 | Large properties, mid-distance, suburban family homes |
| 2 | Medium properties, far from city center, standard suburban |
| 3 | Medium properties, very close to the city center, very old |
Silhouette Score: 0.300 —
tried another cluster too but it underperformed the original one's score
Goal: Predict property price (AUD)
| Model | R² | MAE |
|---|---|---|
| Baseline Linear Regression | 0.401 | 332,240 |
| Improved Linear Regression | 0.433 | 324,681 |
| KNN Regressor | 0.439 | 308,010 |
| 🏆 Random Forest | 0.630 | 241,519 |
Winner: Random Forest — captures non-linear relationships that linear models miss.
Most important features: Distance (0.32), Rooms (0.21), Landsize (0.14)


the cluster itself was the least efficient feature but the distance from centroid feature was meaningfull. This means that being in a cluster is not as important as how well the property fits the cluster

Goal: Classify property as Affordable (0) / Mid-Range (1) / Premium (2)
Method: Quantile Binning — equal thirds of the price distribution
Split: 80% Train (14,716 samples) | 20% Test (3,680 samples)

Key observations:
| Model | Accuracy | Macro F1 | Macro Precision |
|---|---|---|---|
| Logistic Regression | 0.6179 | 0.6164 | 0.6162 |
| Decision Tree | 0.6571 | 0.6555 | 0.6545 |
| Random Forest | 0.6948 | 0.6927 | 0.6912 |
random forest is the winner with precision of 0.6912

I iteratively refined a Linear Regression model through feature importance and tested two K-Means configurations to find the best market segments. Random Forest outperformed other classifiers, proving most accurate for predicting price categories. This taught me that intuition isn't enough. constant experimentation is required to see what actually works. Data science is about failing fast and refining.