Mini Project Report Format
Mini Project Report Format
(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
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.
1. .................................... .................................
2. ………………………… .................................
Page 2
ACKNOWLEDGEMENT
CONTENTS
SL.
CONTENT PG. NO
NO
1. Abstract 2
2. Introduction 4
3. Literature Survey 6
System design &
4. 7
Methodology
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.
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.
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.
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
Chapter 2
LITERATURE SURVEY
Chapter 3
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.
The different techniques for which we find the accuracy for our model are as
follows:.
Chapter 4
Chapter 5
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.
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.
REFERENCES
[1] Ayush Varma, Abhijit Sarma, Sagar Doshi, Rohini Nair - “Housing Price
Prediction Using Machine Learning and Neural Networks” 2018, IEEE.
[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.
[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
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)
WEB CODE:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
.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>
</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>