Logo Lanfrica

M-sudais/Nigeria-house-price-predictor

Domaine:

socioeconomic

Type de record:

software
Créateur:
M-s
HĂ´te:
# 🏠 Nigerian House Price Prediction System A machine learning-powered web application that predicts house prices in Nigeria based on property features and location, with explainable AI insights. --- ## 📌 Project Overview This project uses machine learning to estimate house prices across different Nigerian locations. Users can input property details such as number of bedrooms, bathrooms, property type, and location (town and state), and receive a predicted price along with an explanation of the key factors influencing the prediction. The system is deployed as an interactive web app using Streamlit. --- ## 🚀 Features - ✅ Predict house prices instantly - ✅ Supports multiple Nigerian states and towns - ✅ Uses real property features (bedrooms, bathrooms, etc.) - ✅ Explainable AI using SHAP - ✅ Human-readable explanations (not just graphs) - ✅ Clean and interactive UI --- ## 🧠 Machine Learning Approach ### Model Used: - Random Forest Regressor ### Why Random Forest? - Handles non-linear relationships effectively - Performs well on structured/tabular data - Requires minimal preprocessing - More robust compared to linear models in this case --- ## 🔍 Key Findings - 📍 Location is the strongest factor influencing house prices - 🏙️ High-demand areas like Lagos and Abuja significantly increase prices - 🛏️ Property features like bedrooms also contribute meaningfully - ❌ Linear Regression performed poorly even after tuning - 🌳 Tree-based models (Random Forest) performed significantly better --- ## ⚙️ Data Preprocessing - Categorical features (`title`, `town`, `state`) were encoded using: - One-Hot Encoding - Numerical features were used directly - Feature consistency was maintained between training and deployment --- ## 📊 Model Explainability We used SHAP (SHapley Additive exPlanations) to interpret predictions. ### Improvements made: - Only top important features are shown - Removed confusing negative contributions - Converted technical outputs into human-re …