Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏠 House Price Prediction

A smart AI system that predicts house prices across India. Just enter your property details — city, area, BHK, floor, furnishing — and get an instant price estimate in seconds.


🎯 What Does This Project Do?

This project predicts how much a house is worth based on its features like city, size, number of rooms, floor number, age, parking, etc.

It uses 5 different AI models working together like a team — each one makes its own prediction, and then a final "boss" model combines all their answers to give the most accurate price.

Think of it like asking 5 real estate experts and then taking the smartest average of their opinions.


📊 How Accurate Is It?

Metric Value What It Means
Overall Accuracy 92.13% Out of every ₹100, the model is off by only ₹7.87 on average
R² Score 0.9682 The model explains 96.82% of the variation in house prices
MAE ₹15.2 Lakhs Average error is about ₹15 Lakhs (on houses worth ₹20L–₹10Cr+)
MAPE 7.87% Average percentage error across all predictions

Individual Model Scores

Model R² Score
XGBoost 0.9424
LightGBM 0.9705
GradientBoosting 0.9703
ExtraTrees 0.9697
Deep Neural Network 0.9611
Final Stacked Model 0.9682

📈 Performance Graphs

Actual vs Predicted Prices

Actual vs Predicted Prices

Points close to the red dashed line = accurate predictions. Most predictions are tightly packed along this line.

3D Residual Analysis

3D Residual Plot

Full Performance Dashboard

Performance Dashboard

Shows 4 views: scatter plot, residuals, error distribution, and per-model R² comparison.

3D Performance Surface

3D Performance Surface

Additional Plots

Actual vs Predicted Actual vs Predicted 3D


🧠 How It Works (Simple Explanation)

graph TD
    A[Property Details <br> City, BHK, Area, Floor, etc.] --> B[Clean & Prepare the Data]
    B --> C[XGBoost <br> Prediction]
    B --> D[LightGBM <br> Prediction]
    B --> E[3 More Models <br> Predictions]
    C --> F[Meta-Learner XGBoost <br> Combines all 5 predictions]
    D --> F
    E --> F
    F --> G[Final Price Estimate]
    
    classDef default fill:#1f2937,stroke:#3b82f6,stroke-width:2px,color:#f9fafb
    classDef data fill:#065f46,stroke:#10b981,stroke-width:2px,color:#fff
    classDef model fill:#4c1d95,stroke:#8b5cf6,stroke-width:2px,color:#fff
    classDef final fill:#9f1239,stroke:#f43f5e,stroke-width:2px,color:#fff

    class A,B data
    class C,D,E model
    class F,G final
Loading

5 Models Used:

  1. XGBoost — Fast and accurate tree-based model
  2. LightGBM — Another powerful tree model, great with large data
  3. GradientBoosting — Classic ensemble method
  4. ExtraTrees — Randomized decision trees for diversity
  5. Transformer DNN — Deep learning with self-attention (like how ChatGPT processes data)

All 5 predictions are combined by a Meta-Learner (stacking) for the final answer.


🌐 Live Demo & Model Download

👉 Try the Web App on GitHub Pages

⬇️ Download the Deployed Model from Hugging Face


📁 Project Structure

├── House_Price_Training.ipynb        # Training notebook (run this to train)
├── House_Price_Evaluation.ipynb      # Evaluation & graphs notebook
├── app.py                            # Flask web app (local hosting)
├── trainme.py                        # Training script
├── evaluate.py                       # Evaluation script
├── templates/
│   └── index.html                    # Web UI template
├── static/                           # CSS & JS files
├── docs/                             # GitHub Pages static site
│   └── index.html                    # Live demo page
├── requirements.txt                  # Python dependencies
├── Training_dataset/                 # Training & test CSV datasets
├── performance_dashboard.png         # Performance dashboard
├── performance_3d.png                # 3D performance surface
├── hybrid_actual_vs_predicted.png    # Actual vs predicted scatter
├── hybrid_3d_residuals.png           # 3D residual analysis
└── test_predictions.csv              # Predictions on test data

🚀 How to Use

Option 1: Run Locally

git clone https://github.com/AshiteshSingh/House-price-prediction.git
cd House-price-prediction
pip install -r requirements.txt
python app.py

Open http://127.0.0.1:5000

Option 2: Train From Scratch

Open House_Price_Training.ipynb in Jupyter Notebook and run all cells.


🛠️ Built With

Technology
🤖 XGBoost, LightGBM, Scikit-learn
🧠 TensorFlow / Keras (Transformer + ResNet)
🔍 Optuna (hyperparameter tuning)
🌐 Flask (web app)
📊 Matplotlib, Seaborn

🏙️ Supported Cities

Mumbai • Delhi NCR • Bengaluru • Chennai • Hyderabad • Pune • Kolkata • Ahmedabad


Made with ❤️ by Ashitesh

About

House Price Prediction - Ultra Hybrid ML Pipeline combining XGBoost, LightGBM, GBR, ExtraTrees, and Transformer DNN

Topics

Resources

Stars

94 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages