Logo Lanfrica

marwa698/egypt-real-estate-predictor

Domain:

socioeconomic

Record type:

modelsoftware
Creator:
mar
Host:
# 🏠 Egypt Real Estate Price Predictor > An intelligent full-stack ML system that predicts real estate prices across Egypt based on 19,000+ real market listings β€” with SHAP explainability, FastAPI backend, and a bilingual React frontend. --- ## πŸ“Έ Screenshots ### Light Mode (Arabic) ### Dark Mode (English) ### SHAP Explainability ### API Documentation --- ## 🎯 What Makes This Project Different Most real estate price predictors just give you a number. This system: - βœ… **Explains WHY** β€” SHAP values show which factors (location, size, type) drove the prediction - βœ… **Real Market Data** β€” 19,321 cleaned listings from Property Finder Egypt - βœ… **Price Range** β€” not just one number, but a confidence interval - βœ… **Market Comparison** β€” compare your property vs. area average price/mΒ² - βœ… **Bilingual UI** β€” full Arabic (RTL) and English (LTR) support - βœ… **Dark / Light Mode** β€” persisted across sessions --- ## 🧱 Tech Stack | Layer | Technology | |---|---| | Data | 19,321 real listings from Property Finder Egypt | | ML Model | XGBoost (RΒ² = 0.74, MAE β‰ˆ 4.9M EGP) | | Hyperparameter Tuning | Optuna (50 trials) | | Explainability | SHAP via XGBoost native `pred_contribs` | | Backend | FastAPI + Uvicorn | | Frontend | React + Vite | | Styling | CSS3 with CSS Variables (Dark/Light themes) | | Language | Arabic/English toggle with RTL/LTR support | --- ## πŸ“Š Model Performance | Metric | Value | |---|---| | RΒ² Score | **0.74** | | MAE | **~4.9M EGP** | | Training samples | 15,456 | | Test samples | 3,865 | | Hyperparameter tuning | Optuna (50 trials, 3-fold CV) | **Top features by SHAP importance:** 1. Area price per mΒ² (target-encoded) β€” 36.8% 2. Property type β€” 20.4% 3. Size (mΒ²) β€” 11.1% --- ## πŸš€ API Endpoints ``` GET /health β†’ Health check GET /areas β†’ List of governorates, areas, property types POST /predict β†’ Predict price with confidence range POST /explain β†’ SHAP explanation of prediction GET /market-anal …