Skip to content

This project predicts house prices in Bengaluru, India, using machine learning models like Ridge Regression. It includes data preprocessing, model training, evaluation, and fine-tuning, providing a complete approach to building effective regression models for real estate prediction.

License

Notifications You must be signed in to change notification settings

leondmtrv/House-Prediction

Repository files navigation

House Price Prediction Project

Overview

This project aims to predict house prices in Bengaluru, India, using machine learning techniques. We primarily focused on regression models, including Linear Regression, Ridge Regression, Lasso Regression, and Elastic Net. The objective was to develop a model that can accurately estimate house prices based on various features such as location, size, and amenities.

Project Structure

The project is organized as follows:

Installation

To run this project locally, you need to have Python installed. Follow the steps below to set up the environment:

  1. Clone the repository:

    git clone https://github.com/leondmtrv/house-price-prediction.git
    cd house-price-prediction
  2. Create and activate a virtual environment:

    python3 -m venv env
    source env/bin/activate  # On Windows use `env\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Run the Jupyter Notebook:

    jupyter notebook HousePrediction.ipynb

Usage

After setting up the environment, you can explore the project by running the Jupyter Notebook HousePrediction.ipynb. The notebook walks you through each step of the project, from data preprocessing to model evaluation.

Key Components:

  • Data Preprocessing: This section includes steps like handling missing values, encoding categorical features, and scaling numerical features.
  • Model Training: Various regression models are trained on the processed dataset.
  • Model Evaluation: The performance of the models is evaluated using metrics like Mean Squared Error (MSE) and R² score. Visualizations such as Actual vs. Predicted plots and Residual plots are also included.

Results

The Ridge Regression model was identified as the best-performing model based on the test set MSE. However, further fine-tuning did not significantly improve the model's performance, suggesting that the default settings were near-optimal.

Future Work

To further enhance the predictive power of the model, consider the following:

  • Explore Non-Linear Models: Such as Random Forest or Gradient Boosting.
  • Feature Engineering: Introduce new features or transform existing ones to capture non-linear relationships.
  • Outlier Detection: Implement methods to detect and remove outliers to improve model robustness.
  • Ensemble Methods: Use ensemble techniques like bagging or stacking to improve prediction accuracy.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

The dataset used in this project was sourced from Kaggle. Special thanks to the data providers and the open-source community for the tools and libraries that made this project possible.

About

This project predicts house prices in Bengaluru, India, using machine learning models like Ridge Regression. It includes data preprocessing, model training, evaluation, and fine-tuning, providing a complete approach to building effective regression models for real estate prediction.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published