Skip to content

About

End-to-end ML pipeline predicting Italian real estate prices (R²=0.9524) + interactive Next.js 15 dashboard deployed on Vercel

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Italian House Price Prediction — ML + Interactive Dashboard

Live Demo → — deployed on Vercel

End-to-end machine learning project that predicts Italian real estate prices using a Gradient Boosting regressor (R² = 0.9524), paired with a dark-theme interactive dashboard built in Next.js 15 and deployed on Vercel.

Dashboard preview


Highlights

  • 5,000 synthetic properties across 11 Italian cities with 19 raw features
  • 4 models compared via 5-fold cross-validation (Ridge, Lasso, Random Forest, Gradient Boosting)
  • Gradient Boosting wins — CV R² 0.9582, Test R² 0.9524, MAE €29,247
  • 41 features after engineering (age², floor ratio, amenity score, one-hot encoding)
  • Interactive dashboard — KPIs, scatter/residuals toggle, feature importance, market breakdown by city/type/zone

Model Comparison (5-fold CV R²)

Model CV R² Std
Ridge 0.9466 0.0032
Lasso 0.9465 0.0032
Random Forest 0.9066 0.0064
Gradient Boosting 0.9582 —

Final test metrics: R² 0.9524 · MAE €29,247 · RMSE €42,544 · MAPE 11.9%


Tech Stack

Layer Tools
ML pipeline Python, pandas, NumPy, scikit-learn, Matplotlib
Dashboard Next.js 15, TypeScript, Recharts 3, Tailwind CSS v4
Deploy Vercel

Project Structure

├── house-price-ml/               # Python ML pipeline
│   ├── data/
│   │   └── italian_real_estate.csv   # 5,000 synthetic properties
│   ├── src/
│   │   ├── generate_data.py          # Synthetic dataset generation
│   │   └── house_price_model.py      # EDA → feature engineering → training → export
│   ├── visuals/
│   │   ├── house_price_dashboard.png # Matplotlib dashboard
│   │   └── feature_importance.png
│   ├── model_output/
│   │   └── results.json              # Exported metrics → consumed by Next.js
│   └── requirements.txt
│
└── house-price-dashboard/        # Next.js interactive dashboard
    ├── app/
    │   ├── data/results.json         # Model output (source of truth)
    │   └── page.tsx                  # Full single-page dashboard
    └── package.json

Run Locally

Python pipeline

cd house-price-ml
pip install -r requirements.txt
python src/generate_data.py       # generates data/italian_real_estate.csv
python src/house_price_model.py   # generates visuals/ and model_output/results.json

Dashboard

cd house-price-dashboard
npm install
npm run dev     # http://localhost:3000

Feature Engineering Highlights

  • age / age² — captures non-linear depreciation
  • floor_ratio — floor / total_floors (penthouse premium)
  • amenity_score — sum of garage + elevator + balcony + garden + renovated
  • rooms_per_sqm — density proxy
  • Ordinal encoding — energy class (G→A) and condition (poor→excellent)
  • One-hot — city (11), zone (4), property_type (6)

Author

Matteo Aslam · Data & Business Analyst · Microsoft PL-300
LinkedIn · GitHub

About

End-to-end ML pipeline predicting Italian real estate prices (R²=0.9524) + interactive Next.js 15 dashboard deployed on Vercel

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages