0% found this document useful (0 votes)
166 views22 pages

Mini Project Report Format

The document describes a mini project report on house price prediction. It was conducted by 4 students from Dayananda Sagar College of Engineering under the guidance of Prof. Annapoorna B R. The goal of the project was to predict house prices accurately using machine learning algorithms like Ridge Regression. Various factors that influence house prices were analyzed. Satellite images of neighborhoods were also used. The results showed that the combined machine learning model predicted prices with minimum error compared to individual algorithms.

Uploaded by

A To Z INFO
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views22 pages

Mini Project Report Format

The document describes a mini project report on house price prediction. It was conducted by 4 students from Dayananda Sagar College of Engineering under the guidance of Prof. Annapoorna B R. The goal of the project was to predict house prices accurately using machine learning algorithms like Ridge Regression. Various factors that influence house prices were analyzed. Satellite images of neighborhoods were also used. The results showed that the combined machine learning model predicted prices with minimum error compared to individual algorithms.

Uploaded by

A To Z INFO
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

DAYANANDA SAGAR COLLEGE OF ENGINEERING

(An Autonomous Institute affiliated to VTU, Belagavi, Approved by AICTE & ISO 9001:2008)
Accredited by National Assessment & Accreditation Council (NAAC) with ‘A’ grade,
Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-111

Mini Project Report


on
“HOUSE PRICE PREDICTER”
Submitted by
HARSH AHIR (1DS19CS718)
ROHIT KUMAR (1DS19CS739)
SATYAM SAHIB SHARMA (1DS19CS746)
UDIPT SRIVASTAVA (1DS19CS756)

Sixth Semester B.E (CSE)


Mini Project
19CS6DCMIP
Under the guidance of
Prof. Annapoorna B R
Assistant Professor
Dept. of CSE
DSCE, Bangalore

Department of Computer Science and Engineering


Dayananda Sagar College of Engineering Bangalore-111

Page 1
VISVESVARAYA TECHNOLOGICAL UNIVERSITY
DAYANANDA SAGAR COLLEGE OF ENGINEERING
Shavige Malleshwara Hills, Kumaraswamy Layout, Bangalore - 560078
Department of Computer Science & Engineering

CERTIFICATE

This is to certify that the project entitled HOUSE PRICE PREDICTER is a bonafide work
carried out by HARSH AHIR [1DS19CS718], ROHIT KUMAR [1DS19CS739], SATYAM
SAHIB SHARMA[1DS19CS746], UDIPT SRIVASTAVA [1DS19CS756] in partial fulfilment
of 6th semester, Bachelor of Engineering in Computer Science and Engineering under
Visvesvaraya Technological University, Belgaum during the year 2021-22.

Prof.Annapoorna B R Dr.Ramesh Babu Dr.CPS Prakash


(Internal Guide) Vice principal & Head Principal,
Assistant professor Department of CSE, DSCE
Department of CSE, DSCE
DSCE

Signature.................... Signature.................... Signature.................

Name of the Examiners: Signature with date:

1. .................................... .................................
2. ………………………… .................................

Page 2
ACKNOWLEDGEMENT

We are pleased to have successfully completed the Mini project


“HOUSE PRICE PREDICTER”. We thoroughly enjoyed the
process of working on this project and gained a lot of knowledge
doing so.

We would like to take this opportunity to express our gratitude to


Dr. C P S Prakash, Principal of DSCE, for permitting us to utilize
all the necessary facilities of the institution.
We also thank our respected Vice Principal, HOD of Computer
Science & Engineering, DSCE, Bangalore, Dr.Ramesh Babu D R,
for his support and encouragement throughout the process.
We are immensely grateful to our respected and learned guide,
Prof. Annapoorna B R, Assistant professor CSE, DSCE for
his/her valuable help and guidance. We are indebted to them for
their invaluable guidance throughout the process and their useful
inputs at all stages of the process.
We also thank all the faculty and support staff of Department of
Computer Science, DSCE. Without their support over the years,
this work would not have been possible.
Lastly, we would like to express our deep appreciation towards
our classmates and our family for providing us with constant
moral support and encouragement. They have stood by us ing
the most difficult of times.
HOUSE PRICE PREDICTION 1

CONTENTS

SL.
CONTENT PG. NO
NO

1. Abstract 2
2. Introduction 4
3. Literature Survey 6
System design &
4. 7
Methodology

5. Snapshots and Results 9

Conclusion & Future


6. 11
Enhancements
7. References 13
8. Appendix 15

Department of CSE, DSCE Page 1


HOUSE PRICE PREDICTION 2

ABSTRACT

Machine learning plays a major role from past years in image detection, Spam
recognition, normal speech command, product recommendation and medical
diagnosis along it provides better customer service and safer automobile systems.
This shows that ML is trend in almost all fields so we try to coined up ML in our
project for betterment. Nowadays, people looking to buy a new home tend to be
more conservative with their budgets and market strategies.
The current systems main disadvantage is that the calculation of house prices are
done without the necessary prediction about future market trends and price
increase.
The goal of the project is to predict the efficient house pricing for real estate
customers with respect to their budgets and priorities.
Real estate is the least transparent industry in our ecosystem. Housing prices
keep changing day in and day out and sometimes are hyped rather than being
based on valuation. Predicting housing prices with real factors is the main crux of
research project.
Here we aim to make our evaluations based on every basic parameter that is
considered while determining the price. We use various regression techniques in
this pathway, and our results are not sole determination of one technique rather it
is the weighted mean of various techniques to give most accurate results. The
results proved that this approach yields minimum error and maximum accuracy
than individual algorithms applied. We also propose to use real-time
neighborhood details using Google maps to get exact real-world valuations.
This study utilizes machine learning algorithms as a research method that
develops housing price prediction models. We create a housing cost prediction
model In view of machine learning algorithm models for example, Ridge
regression on look at their order precision execution. We in that point
recommend a housing cost prediction model to support a house vender or a real
estate agent for better information based on the valuation of house. Those
examinations exhibit that machine algorithm, in view of accuracy, reliably
outperforms alternate models in the execution of housing cost prediction.
Department of CSE, DSCE Page 2
HOUSE PRICE PREDICTION 3

The system would give comparison of prices of house at particular location for
customers. It would also give comparative pricing rates to builder so that he can
estimates his construction budget to compete with other builders at that area.
The satellite images have been used to visualize impression of neighborhood.
Machine Learning Algorithm and Linear Regression is used for estimation of
house pricing. The project is purpose to predict price of houses at particular area
to people and builders.
The developer and customer will be benefited by this model on determining the
selling price of a house and helps the latter to arrange the right time to purchase a
house
House price Predicter will help to find the best alternative without any need of
broker.

Department of CSE, DSCE Page 3


HOUSE PRICE PREDICTION 4

Chapter 1

INTRODUCTION
Development of civilization is the foundation of increase of demand of houses
day by day. Accurate prediction of house prices has been always a fascination for
the buyers and sellers.
The market demand for housing is always increasing every year due to increase
in population and migrating to other cities for their financial purpose. Prediction
of house price for long-term temporary basis is important especially for the
people who stays who will stay the long time period but not permanent and the
people who do not want to take any risk during the house construction. In-order
to forecast house price one person usually tries to locate similar properties at his
or her neighborhood and based on collected data that person will try to predict
the house price.Ridge Regression - It is a tool for analysis of Multiple Regression
on the data that have multicollinearity(mcl). Multicollinearity(mcl) is existence
of near–linear relationships among the variables which are independent.
The crucial element in machine learning task for which a particular attention
should be clearly taken is the data. Indeed the results will be highly influenced by
the data based on where did we find them, how are they formatted, are they
consistent, is there any outlier and so on. At this step, many questions should be
answered in order to guarantee that the learning algorithm will be efficient and
accurate.

1.) Collecting the data

The first step is data science work where we take a data set from Kaggle called
‘Bengaluru_house.csv’.We will perform some extensive data cleaning work on it
to ensure that it gives accurate results during prediction.

This Jupyter notebook entitled ‘House_prediction_model.ipynb’ is where we


perform all the data science-related work. Our dataset requires a lot of work in
terms of data cleaning. In fact, 70% of the notebook is all about data cleaning
where we drop empty rows and remove unnecessary columns that won’t help in
prediction which is also called an outlier.

Department of CSE, DSCE Page 4


HOUSE PRICE PREDICTION 5

2.) Model Creation

Outliers are anomalies that cause an enormous amount of damage to data and
prediction. There is a lot of things to understand from the dataset logically to
detect and remove these outliers.

after that, Turns out the Ridge model gives the best results for our data with a
score above 80% which is not bad. we extracting useful and important
information from the dataset and dumped it in "RidgeModel.pkl" which will help
us to predict the price successfully.

Using this ridge model's pickle file we convert python objects into a character
stream. Also, we need to export the locations(columns) into a json(columns.json)
file to be able to interact with it from the frontend.

3.) Server

We will use a Flask server as our backend to host the application locally. In the
server folder.

4.) Front-end

The front end is made up of simple HTML, CSS, and JavaScript. The user can
select the number of square feet area, BHK, bathrooms, and location in the form
and hit on the ‘PREDICT’ button to get the estimated price. The JavaScript file is
responsible for interacting with both the backend flask server routes and the
frontend HTML

 Location of the house


 Number of Bedroom
 Number Bathroom
 Square Feet

Department of CSE, DSCE Page 5


HOUSE PRICE PREDICTION 6

Chapter 2

LITERATURE SURVEY

For the project, HOUSE PRICE PREDICTER , the following research


papers as well as many sites were referred before the implementation
process. These all are studied are given below which are:

I. International Journal of Computer Sciences and Engineering Open Access


Research Paper Vol.8, Issue.7, July 2020 E-ISSN:House Price Prediction
Bindu Sivasankar1 for Department of Computer Science and Engineering,
Younus College of Engineering and Technology, Kollam, Kerala, India
Available online at: www.ijcseonline.org Received: 21/July/2020,
Accepted: 27/July/2020, Published: 31/July/2020.

II. House Price Prediction using a Machine Learning Model: A Survey of


Literature uploaded on December 2020, International Journal of Modern
Education and computer Science.

III.House Price Prediction Modeling Using Machine Learning Dr. M.


Thamarai Professor, Sri Vasavi Engineering College, Andhra Pradesh,
India Email: [email protected] Dr. S P.
Malarvizhi Associate Professor, Sri Vasavi Engineering College, Andhra
Pradesh, India Email: [email protected]. Received:
17 July 2019; Accepted: 25 October 2019; Published: 08 April 2020.

IV.House Price Prediction: Hedonic Price Model vs. Artificial Neural


Network Visit Limsombunchai1 Commerce Division, Lincoln University,
Canterbury 8150, New Zealand.

Department of CSE, DSCE Page 6


HOUSE PRICE PREDICTION 7

Chapter 3

SYSTEM DESIGN & METHODOLOGY

For this project we use Jupiter IDE. Jupiter IDE is an open-source web app that
helps us to share as well create documents which have livecode, visualizations,
equations and text that narrates. It contains tools for data cleaning, transformation
of data, simulation of numeric values, modeling using statistics, visualization of
data and machine learning tools. Here we collected house sales related data to
estimate the house prices based on real world dataset IA. It is a public output
dataset of that specified region in Bengaluru. Here we used other tools like Scipy,
Seaborn and Pandas. All the above mentioned regression techniques are
implemented using the above specified tools. In order to find out the efficient
regression technique for prediction, we require certain parameters to perform
comparison among the techniques. The parameters chosen for the comparison are
Scores of the algorithm, [RMSE] Root Mean Square Error.

After finding out R square value of ridge regression , lasso regression and Linear
regression ,we came to conclusion that we are going to use Ridge regression as it
has more accuracy for our dataset so we performed are further prediction using
ridge regression and then using pickle in python which helps to convert the a
python object in bit stream to store it in file/databases. The following is the graph
for Linear regression model for our project.

Department of CSE, DSCE Page 7


HOUSE PRICE PREDICTION 8

The different techniques for which we find the accuracy for our model are as
follows:.

Ridge Regression - Ridge regression is a method of estimating the coefficients


of multiple-regression models in scenarios where linearly independent variables
are highly correlated. It has been used in many fields including econometrics,
chemistry, and engineering.

Linear regression -Linear regression analysis is used to predict the value of a


variable based on the value of another variable.

Department of CSE, DSCE Page 8


HOUSE PRICE PREDICTION 9

Chapter 4

SNAPSHOTS AND RESULTS

Department of CSE, DSCE Page 9


HOUSE PRICE PREDICTION 10

Chapter 5

Department of CSE, DSCE Page 10


HOUSE PRICE PREDICTION 11

CONCLUSION

This article uses the most fundamental machine learning algorithms like Linear
regression and Ridge regression.
Work is implemented using Scikit-Learn machine learning tool.
This work helps the users to predict the availability of houses in the city and also
to predict the prices of the houses.
Two algorithms that are Ridge regression and linear regression were used in
predicting the prices of the houses. Comparatively the performance of Ridge
regression is found to be better than the other regression techniques in predicting
the house prices.

Department of CSE, DSCE Page 11


HOUSE PRICE PREDICTION 12

FUTURE ENHANCEMENTS

In future the Dataset can be prepared with more features and advanced machine
learning techniques can be for constructing the house price prediction model.
The project has a very vast scope in future. The project can be implemented on
intranet in future. Project can be updated in near future as and when requirement
for the same arises, as it is very flexible in terms of expansion.
House price prediction can help the developer determine the selling price of a
house and can help the customer to arrange the right time to purchase a house.
This project is currently working on deployment using flask and automate the
result file. Use another country housing data set for prediction. This project is
also in other sectors as well as other countries, is yet to be explored.

Department of CSE, DSCE Page 12


HOUSE PRICE PREDICTION 13

REFERENCES

[1] Ayush Varma, Abhijit Sarma, Sagar Doshi, Rohini Nair - “Housing Price
Prediction Using Machine Learning and Neural Networks” 2018, IEEE.

[2] Naga Satish, Ch.V.Raghavendran, M.D.Sugnana Rao, Ch.Srinivasulu “House


Price Prediction Using Machine Learning”. IJITEE, 2019.

[3] CH. Raga Madhuri, G. Anuradha, M. Vani Pujitha -” House Price Prediction
Using Regression Techniques: A Comparative Study” 2019 in (ICSSS),IEEE.

[4] Sifei Lu, Zengxiang Li, Zheng Qin , Xulei Yang , Rick Siow Mong Goh - “A
hybrid regression technique for house prices prediction” 2017,IEEE

[5] Bharatiya, Dinesh, et al. “Stock market prediction using linear regression.”
Electronics, Communication, and Aerospace Technology (ICECA), 2017
International conference of. Vol. 2. IEEE, 2017.

[6] Vincy Joseph, Anuradha Srinivasaraghavan- “Machine Learning”.

[7] Trevor Hastie, Robert Tibshirani, Jerome Friedman- “The Elements of


Statistical Learning”.

[8] Tom M Mitchell- “Machine Learning”

[9] Saleh Hyatt- “Machine Learning Fundamentals”.

Department of CSE, DSCE Page 13


HOUSE PRICE PREDICTION 14

[10] P. Durganjali, M. Vani Pujitha, ”House Resale Price Prediction Using


Classification Algorithms”, 2019 International Conference on Smart Structure
and Systems(ICSSS), Chennai, India, 2019, pp.1-4,
doi:10.1109/ICSSS.2019.8882842.

[11] Ayush Varma, Abhijit Sarma, Rohini Nair and Sagar Doshi, ”House Price
Prediction Using Machine Learning And Neural Networks”, @2018 IEEE, 2018
Second International Conference on Inventive Communication and
Computational Technologies(ICICCT), Coimbatore, India,
DOI:10.1109/ICICCT.2018.8473231.

[12] Sifei Lu, Zengxiang Li, Zheng Qin, Xulei Yang, Rick Siow Mong Goh, ”A
Hybrid Regression Technique for House Prices Prediction”, @2017 IEEE, 2017
IEEE International Conference on Industrial Engineering and Engineering
Management(IEEM), Singapore, DOI:10.1109/IEEM.2017.8289904

Department of CSE, DSCE Page 14


HOUSE PRICE PREDICTION 15

APPENDIX
Code:
import pandas as pd
import numpy as np
from flask import Flask, render_template,request
import pickle

app=Flask(__name__)
data=pd.read_csv("Data/Clean_data.csv")
pipe=pickle.load(open("Ridge_Model.pkl","rb"))

@app.route('/')
def index():

locations=sorted(data["location"].unique())
return render_template('index.html', locations=locations)

@app.route('/predict', methods=['POST'])
def predict():
locations=request.form.get('location')
bhk = float(request.form.get('Bhk'))
bath = float(request.form.get('bath'))
sqft = float(request.form.get('total_sqft'))
print(locations,bhk,bath,sqft)

input=pd.DataFrame([[locations,sqft,bath,bhk]],columns=["location","total_sqft",
"bath","Bhk"])
prediction=str(np.round((pipe.predict(input)[0]+0.2)/100,2)) # I have
converted Lakhs into Crores. Since data set is old, so I have added 0.2(20lakhs to
compansate inflation.
return "The predicted house price is {} crore".format(prediction)

if __name__=="__main__":
app.run(debug=True,port=5000)

Department of CSE, DSCE Page 15


HOUSE PRICE PREDICTION 16

WEB CODE:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Bootstrap CSS -->


<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]
beta1/dist/css/bootstrap.rtl.min.css" integrity="sha384-
dc2NSrAXbAkjrdm9IYrX10fQq9SDG6Vjz7nQVKdKcJl3pC+k37e7qJR5CS
+wR" crossorigin="anonymous">
<style>
body {
height: 1080px;
background: linear-gradient(to bottom, #004e92 25%, #6dd5ed100%);
}

.card{
height: 600px;
background: linear-gradient(to bottom, #FDFCFB 20%, #E2D1C3
100%);
text: white;
}
</style>
<title>House price predictor</title>
</head>
<body class="p-3 bg-info text-black">
<div class='container'>
<div class="row">
<div class="card" style="height:200; width: 100%; margin-top: 100px">
<div class="card-header" style="text-align: center">
<h1 style="color:Tomato;">Bangalore House Price Predictor</h1>
</div>
<div class="card-body">
<form method="post" accept-charset="utf-8">
<div class="row">
Department of CSE, DSCE Page 16
HOUSE PRICE PREDICTION 17

<div class="col-md-6 form-group" style="text-align: center">


<label><b>Select the Location</b></label>
<select class="select-picker form-control" id="location"
name="location" required="1">
{% for location in locations %}
<option value="{{location}}">{{location}}</option>
{% endfor %}
</select>
</div>
<div class="col-md-6 form-group" style="text-align: center">
<label><b>Enter Number of BHK </b></label>
<input type="text" class="form-control" id="Bhk" name="Bhk"
placeholder="Enter BHK">
</div>
<div class="col-md-6 form-group" style="text-align: center">
<label><b>Enter Number of Bathroom </b></label>
<input type="text" class="form-control" id="bath" name="bath"
placeholder="Enter number of Bathroom">
</div>
<div class="col-md-6 form-group" style="text-align: center">
<label><b>Enter Area in Square feet </b></label>
<input type="text" class="form-control" id="total_sqft"
name="total_sqft" placeholder="Enter area in sqft.">
</div>
<div>
<br>
</div>
<div class="col-md-50 form-group">
<button class="btn btn-primary form-control"
onclick="send_data()">Predict Price</button>
</div>
</div>
</form>
<br>
<div class="col-md-12" style="text-align: center">
<h3><span id="prediction"></span></h3>
</div>
</div>
Department of CSE, DSCE Page 17
HOUSE PRICE PREDICTION 18

</div>
</div>
<script>
function form_handler(event){
event.preventDefault(); // Don't submit the form normally
}

function send_data()
{
document.querySelector('form').addEventListener("submit",form_handler);
var fd=new FormData(document.querySelector('form'));
var xhr=new XMLHttpRequest();
xhr.open('POST','/predict',true);
document.getElementById("prediction").innerHTML="Wait Predicting
Price...";
xhr.onreadystatechange=function(){
if(xhr.readyState==XMLHttpRequest.DONE){
document.getElementById("prediction").innerHTML=xhr.responseText;
}
}
xhr.onload=function(){};
xhr.send(fd);
}

</script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.j
s" integrity="sha384-
Xe+8cL9oJa6tN/veChSP7q+mnSPaj5Bcu9mPX5F5xIGE0DVittaqT5lorf0EI7Vk
" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]
beta1/dist/js/bootstrap.min.js" integrity="sha384-
kjU+l4N0Yf4ZOJErLsIcvOU2qSb74wXpOhqTvwVx3OElZRweTnQ6d31fXEo
RD1Jy" crossorigin="anonymous"></script>
</body>
</html>

Department of CSE, DSCE Page 18


HOUSE PRICE PREDICTION 19

PROJECT SOURCE CODE LINK:

GITHUB LINK - https://github.com/satyam439/Housing_price_prediction

Department of CSE, DSCE Page 19

You might also like