A machine learning web application that predicts property prices in Bangalore, India. This project uses a Linear Regression model trained on real estate data to estimate house prices based on area (square feet), location, and number of BHK/Bathrooms.
- Accurate Predictions: Uses a Scikit-learn Linear Regression model optimized via GridSearchCV.
- Dynamic UI: Interactive web interface with a dynamic location dropdown fetched from the model's feature set.
- Data-Driven: Trained on a comprehensive dataset of Bangalore property prices with robust outlier detection and feature engineering.
- Deployment Ready: Includes configuration for deployment on platforms like Heroku.
- Backend: Flask (Python)
- Machine Learning: Scikit-learn, Pandas, NumPy
- Frontend: HTML5, CSS3 (Bootstrap), JavaScript (jQuery)
- Deployment: Gunicorn
app.py: Main Flask application server.model.py: Script for data cleaning, feature engineering, and model training.model.ipynb: Jupyter notebook for exploratory data analysis.bangalore_home_prices_model.pickle: Trained model artifact.columns.json: Mapping of feature names for the model.templates/: HTML templates for the web interface.static/: CSS/JS and image assets.
git clone https://github.com/Rahul-Vats20/House-predictor.git
cd House-predictorIt is recommended to use a virtual environment.
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtpython app.pyOpen your browser and navigate to http://127.0.0.1:5000/.
If you wish to retrain the model, you can run the model.py script:
python model.pyThis will regenerate bangalore_home_prices_model.pickle and columns.json.