GithubHelp home page GithubHelp logo

f-yousefi / house_price_prediction Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 652 KB

This repository contains code for House Price prediction using Linear Regression. This project is based on the dataset that can be found through Tehran (Divar.ir) House Price Prediction thanks to Dr. Soheil Tehranipour who has done a very excellent job in the area of AI and ML.

Home Page: http://f-yousefi.github.io

License: MIT License

Jupyter Notebook 98.55% Python 1.45%
ai gradient-descent house-price-prediction linear-regression normal-equation

house_price_prediction's Introduction

header.png

House Price Prediction using Linear Regression#2

This repository contains code for House Price prediction using Linear Regression. This project is based on the dataset that can be found through Tehran (Divar.ir) House Price Prediction thanks to Dr. Soheil Tehranipour who has done a very excellent job in the area of AI and ML. The current repository contains a detailed description of the process of visualization and preprocessing the dataset. This repository also contains a stable version of Linear Regression that can be used in other projects related to Machine Learning.

Table of Contents

Requirements

This project does not need any specific requirements. The dataset, "Tehran (Divar.ir) House Price Prediction", also is included in the repository.

Dataset and pre-processing

  • We currently provided the dataset in the directory ./dataset. However, the linear regression package can be used with various dataset.

    • Your data directory looks like:
      (Optional) You can change the directory of the dataset when running the train.py in terminal.
      - dataset/
          - __init__.py
          - dataset.py
          - config.py
          - divar_tehran_dataset ...
              - DivarHousePrice.csv
      
      

Training Linear Regression

  • We assume that you have cloned the repository.
  • To train Linear Regression using the terminal environment, we assume that the dataset is placed in ./dataset/divar_tehran_dataset/, so you should simply run the following command. !python train.py By running the following command, you will get more information about the module.
>!python train.py -help 
Usage: train.py [options]
Options:
  -h, --help            show this help message and exit
  -p TRAIN_PATH, --path=TRAIN_PATH
                        Path to training data.
  -m METHOD, --method=METHOD
                        choose between 'normal-equation' and 'gradient-descent'
                        default value is 'normal-equation'

As you can see above, you can choose either Linear Regression to be based on Gradient Descent or Normal Equation. However, the default method would be "normal-equation".

!python train.py -p "./dataset/divar_tehran_dataset/DivarHousePrice.csv" -m "gradient-descent"

training_process_GD.gif

Colaboratory Notebook

The Second way to train Linear Regression is to use the .ipynb file in the main directory. It is very informative and builds up your intuition of the process of pre-processing and makes you more knowledgeable about the dataset. In addition, you don't even need to clone the repository, because it can be executed by Google Colaboratory Online.

notebook_visualize.gif

References:

The following list contains several links to every resource that helped us implement this project.

  1. Kaggle dataset published by Soheil Tehranipour
  2. Maths-ML developed by Farzad Yousefi
  3. Machine Learning course published by Coursera

house_price_prediction's People

Contributors

f-yousefi avatar

Stargazers

 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.