Housing Price Prediction Using Machine Learning

Nihar javiya
5 min readOct 7, 2020

What is Machine Learning?

Machine learning could be a subfield of computer science .The goal of machine learning typically is to know the structure information of knowledge of informatiom and match that data into models that may be understood and utilised by folks.

Machine learning plays significant role from past years in image detection, spam reorganization, traditional speech command, product recommendation and diagnosis. The objective of this informing is to gift an summary of the machine learning techniques currently in use or in thought at applied mathematics agencies worldwide.

Classes of machine learning:

1] Supervised Learning: In supervised learning the data is in labeled and the aim of this methodology is for the rule to be able to “learn” by comparison its actual output with the “taught” outputs to search out errors, and modify the model consequently. supervised learning so uses patterns to predict label values on extra unlabeled knowledge. Here the example of supervised machine learning algorithms is: Linear regression for regression issues. Random forest for classification and regression issues. Support vector machines for classification issues

2] Unsupervised Learning: Unsupervised learning may be a style of machine learning algorithmic program wont to draw inferences from datasets consisting of computer file while not labelled responses. The most common unsupervised learning methodology is cluster analysis, that is employed for explorative information analysis to seek out hidden patterns or grouping in information.

Which Algorithm is used?

1] Linear Regression: Linear regression is one the simplest and most well liked Machine Learning algorithms. simple regression makes predictions for continuous/real or numeric variables like sales, salary, age, product worth, etc.

Linear regression formula shows a linear relationship between a dependent (y) and one or additional freelance (y) variables, therefore known as simple regression. Since simple regression shows the linear relationship, which implies it finds however the worth of the variable quantity is dynamical in keeping with the worth of the variable.

2] Multilayer perceptron (MLP) :A multilayer perceptron (MLP) may be a category of feedforward artificial neural network (ANN). MLP utilizes a supervised learning technique known as backpropagation for coaching. Its multiple layers and non-linear activation distinguish MLP from a linear perceptron. It will distinguish information that’s not linearly dissociable.

MLP is use for Tabular datasets Classification prediction problems Regression prediction problems.

Implementation

In this project of housing price prediction, we use two algorithms one of them is linear regression and another is MLP. The first we take the dataset of Bangalore house price prediction. And this dataset having the huge amount of record. So first of all task is to reduce this huge amount of record. So for that we try to collect all the null value and try to clean it. In this dataset there is also a categorical features and we try to reduce those unnecessary categorical features that we don’t want in that model like area type, society and availability.

We also add the main categorical features that is bhk. When we are predicting the model the string values which is not considerable, the numerical values which is requried so first of all we extract the locations and then we convert all string values into a form of numerical. Then we want the output as a continueous values so we requried the relationship between independent variable and dependent variable or we can say that the input variable and continueos quantity.

For that we drop the price and mapping the price with the all categorical features. so that we are having the relationship and now we move forward to do mapping and plotting the graph for that we are using matplotlib library to figure out the graph. Now we have to check our model test and train accuracy through linear regression so we are having test accuracy approximate 87%.

We also implement house price prediction using Multilayer perceptron (MLP). Now in MLP we done with the same methodology for data cleaning but, difference is now we are predicting the model using MLP. Now we have to check our model test and train accuracy through MLP so we are having test accuracy approximate 95%. And that is higher than linear regression.

Dataset & Record
Clean null value
Total square feet vs Price per square feet
Number of bath vs Count
: Price per square feet vs Count
Create dummies
Accuracy using linear regression
Accuracy of MLP

Conclusion:

Predicting housing costs prediction in the dataset of Bangalore could be a task that requires insight into the information combined with machine learning algorithms. during this work, we tend to applied two different ways for this task, first is linear regression and second is MLP. We grab the accuracy using the linear regression which is 87% and also we grab accuracy 95% with the use of MLP. We also compare the actual price of a house with our predicted price and observe the deviation. As you can see, the MLP showed the best accuracy, so we decided to use this algorithm

--

--