Giter Club home page Giter Club logo

avr2002 / regression-models-for-house-price-prediction Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.13 MB

House Price Prediction using different regression models like Linear, Ridge, Lasso, Elastic Net, Random Forest, XGBoost, K-Nearest Neighbours, Support Vector Regressor, XGBoost. Also, multi-layer perceptron(MLP) was implemented using TensorFlow

Home Page: https://github.com/avr2002/Regression-Models-for-House-Price-Prediction

License: GNU General Public License v3.0

Python 0.36% Jupyter Notebook 99.64%
feature-engineering house-price-prediction lasso-regression linear-regression machine-learning mlp-regressor multi-layer-perceptron python random-forest-regression ridge-regression scikit-learn tensorflow xgboost-regression

regression-models-for-house-price-prediction's Introduction

Regression-Models-for-House-Price-Prediction

1. Create a new environment

```conda create -p venv python==3.7 -y```
```conda create -p venv python```
```conda activate venv/```

2. Install all the requirements

```pip install -r requirements.txt```

3. Run the engine.py file to execute the code

```python engine.py```

# Real Estate Project Overview

Business Objective

The price of a house is based on several characteristics such as location, total area, number of rooms, various amenities available, etc. In this project, we will perform house price prediction for 200 apartments in Pune city. Different regression models such as Linear, Random Forest, XGBoost, etc., will be implemented. Also, multi-layer perceptron (MLP) models will be implemented using scikit-learn and TensorFlow. This house price prediction project will help you predict the price of houses based on various features and house properties.

Data Description

We are given a real estate dataset with around 200 rows and 17 different variables that play an important role in predicting our target variable, i.e., price.

Aim

The goal is to predict sale prices for homes in Pune city.

Approach

  1. Data Cleaning
    • Importing the required libraries and reading the dataset.
    • Preliminary exploration
    • Check for the outliers and remove outliers.
    • Dropping of redundant feature columns
    • Missing value handling
    • Regularizing the categorical columns
    • Save the cleaned data
  2. Data Analysis
    • Import the required libraries and read the cleaned dataset.
    • Converting binary columns to dummy variables
    • Feature Engineering
    • Univariate and Bivariate analysis
    • Check for correlation
    • Feature selection
    • Data Scaling
    • Saving the final updated dataset
  3. Model Building
    • Data preparation
    • Performing train test split
    • Linear Regression
    • Ridge Regression
    • Lasso Regressor
    • Elastic Net
    • Random Forest Regressor
    • XGBoost Regressor
    • K-Nearest Neighbours Regressor
    • Support Vector Regressor
  4. Model Validation
    • Mean Squared Error
    • R2 score
    • Plot for residuals
  5. Performs the grid search and cross-validation for the given regressor
  6. Fitting the model and making predictions on the test data
  7. Checking for Feature Importance
  8. Model comparisons.
  9. MLP (Multi-Layer Perceptron) Models
    • MLP Regression with scikit-learn
    • Regression with TensorFlow

Project Takeaways

  1. Understanding the business problem.
  2. Importing the dataset and required libraries.
  3. Performing basic Exploratory Data Analysis (EDA).
  4. Data cleaning and missing data handling if required, using appropriate methods.
  5. Checking for outliers
  6. Using Python libraries such as matplotlib and seaborn for data interpretation and advanced visualizations.
  7. Splitting dataset into train and test data
  8. Performing Feature Engineering on data for better performance.
  9. Training a model using Regression techniques like Linear Regression, Random Forest Regressor, XGBoost Regressor, etc.
  10. Training multiple models using different Machine Learning Algorithms suitable for the scenario and checking for best performance.
  11. Performing grid search and cross-validation for the given regressor
  12. Making predictions using the trained model.
  13. Gaining confidence in the model using metrics such as MSE, R2
  14. Plot the residual plots for train and test data
  15. Find those features that are most helpful for prediction using Feature Importance.
  16. Model comparison
  17. Learn how to build a Multi-Layer Perceptron model using the Scikit-learn library
  18. Learn how to build a Multi-Layer Perceptron model using TensorFlow

regression-models-for-house-price-prediction's People

Contributors

avr2002 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.