Real Estate Investment Advising Using Machine Learning

Similar documents
MIT 801. Machine Learning I. [Presented by Anna Bosman] 16 February 2018

Nearest Neighbor Predictors

Distribution-free Predictive Approaches

Supervised Learning Classification Algorithms Comparison

Predicting User Ratings Using Status Models on Amazon.com

Linear Regression and K-Nearest Neighbors 3/28/18

Classifiers and Detection. D.A. Forsyth

Estimating Data Center Thermal Correlation Indices from Historical Data

CHAPTER 4 STOCK PRICE PREDICTION USING MODIFIED K-NEAREST NEIGHBOR (MKNN) ALGORITHM

International Journal of Scientific Research & Engineering Trends Volume 4, Issue 6, Nov-Dec-2018, ISSN (Online): X

Six Weeks:

Network Traffic Measurements and Analysis

Data Analysis and Solver Plugins for KSpread USER S MANUAL. Tomasz Maliszewski

AM 221: Advanced Optimization Spring 2016

INTELLIGENT SUPERMARKET USING APRIORI

COSC160: Detection and Classification. Jeremy Bolton, PhD Assistant Teaching Professor

1 Training/Validation/Testing

Allstate Insurance Claims Severity: A Machine Learning Approach

Performance Evaluation of Various Classification Algorithms

Jarek Szlichta

Random Forest A. Fornaser

6th Grade P-AP Math Algebra

Supplementary Material

Classifying Building Energy Consumption Behavior Using an Ensemble of Machine Learning Methods

Statistical Analysis of Metabolomics Data. Xiuxia Du Department of Bioinformatics & Genomics University of North Carolina at Charlotte

Data Mining and Machine Learning: Techniques and Algorithms

International Journal of Software and Web Sciences (IJSWS)

Partitioning Data. IRDS: Evaluation, Debugging, and Diagnostics. Cross-Validation. Cross-Validation for parameter tuning

Business Club. Decision Trees

Data Mining. 3.5 Lazy Learners (Instance-Based Learners) Fall Instructor: Dr. Masoud Yaghini. Lazy Learners

Accelerometer Gesture Recognition

Nearest neighbor classification DSE 220

Going nonparametric: Nearest neighbor methods for regression and classification

Context-sensitive Classification Forests for Segmentation of Brain Tumor Tissues

Applying Supervised Learning

1) Give decision trees to represent the following Boolean functions:

2016 Market Update. Gary Keller and Jay Papasan Keller Williams Realty, Inc.

PS 6: Regularization. PART A: (Source: HTF page 95) The Ridge regression problem is:

Data Mining Lecture 8: Decision Trees

DS Machine Learning and Data Mining I. Alina Oprea Associate Professor, CCIS Northeastern University

2.1 Solutions to Exercises

Topic 7 Machine learning

Clustering Billions of Images with Large Scale Nearest Neighbor Search

SUPERVISED LEARNING METHODS. Stanley Liang, PhD Candidate, Lassonde School of Engineering, York University Helix Science Engagement Programs 2018

Statistical Pattern Recognition

K- Nearest Neighbors(KNN) And Predictive Accuracy

Nearest Neighbor Classification. Machine Learning Fall 2017

A STUDY OF SOME DATA MINING CLASSIFICATION TECHNIQUES

Instance-Based Learning: Nearest neighbor and kernel regression and classificiation

Scope and Sequence: National Curriculum Mathematics from Haese Mathematics (4 7)

CS 229 Midterm Review

HPISD Eighth Grade Math

K-Nearest Neighbour (Continued) Dr. Xiaowei Huang

Introduction to CS databases and statistics in Excel Jacek Wiślicki, Laurent Babout,

Analytical model A structure and process for analyzing a dataset. For example, a decision tree is a model for the classification of a dataset.

Spatial Outlier Detection

Lecture 06 Decision Trees I

COMPUTATIONAL INTELLIGENCE SEW (INTRODUCTION TO MACHINE LEARNING) SS18. Lecture 6: k-nn Cross-validation Regularization

Summary Statistics. Closed Sales. Paid in Cash. New Pending Sales. New Listings. Median Sale Price. Average Sale Price. Median Days on Market

Power Load Forecasting Based on ABC-SA Neural Network Model

Big Data Methods. Chapter 5: Machine learning. Big Data Methods, Chapter 5, Slide 1

Non-trivial extraction of implicit, previously unknown and potentially useful information from data

Recent Progress on RAIL: Automating Clustering and Comparison of Different Road Classification Techniques on High Resolution Remotely Sensed Imagery

CHAPTER 6 MODIFIED FUZZY TECHNIQUES BASED IMAGE SEGMENTATION

CSCI567 Machine Learning (Fall 2014)

6th Grade Advanced Math Algebra

Instance-Based Learning: Nearest neighbor and kernel regression and classificiation

Evaluation Measures. Sebastian Pölsterl. April 28, Computer Aided Medical Procedures Technische Universität München

A Recommender System Based on Improvised K- Means Clustering Algorithm

K-Nearest-Neighbours with a Novel Similarity Measure for Intrusion Detection

3 Nonlinear Regression

Clustering Algorithms for Data Stream

Problem 1: Complexity of Update Rules for Logistic Regression

R (2) Data analysis case study using R for readily available data set using any one machine learning algorithm.

REMOVAL OF REDUNDANT AND IRRELEVANT DATA FROM TRAINING DATASETS USING SPEEDY FEATURE SELECTION METHOD

On Classification: An Empirical Study of Existing Algorithms Based on Two Kaggle Competitions

K-Nearest Neighbors. Jia-Bin Huang. Virginia Tech Spring 2019 ECE-5424G / CS-5824

Nonparametric Classification Methods

Predictive Analysis: Evaluation and Experimentation. Heejun Kim

Data Mining and Data Warehousing Classification-Lazy Learners

Machine Learning: An Applied Econometric Approach Online Appendix

Lecture on Modeling Tools for Clustering & Regression

Grade 6 Curriculum and Instructional Gap Analysis Implementation Year

CSC 411: Lecture 02: Linear Regression

Lecture 3: Linear Classification

OVERVIEW & RECAP COLE OTT MILESTONE WRITEUP GENERALIZABLE IMAGE ANALOGIES FOCUS

DS504/CS586: Big Data Analytics Data Management Prof. Yanhua Li

( ) = Y ˆ. Calibration Definition A model is calibrated if its predictions are right on average: ave(response Predicted value) = Predicted value.

Reddit Recommendation System Daniel Poon, Yu Wu, David (Qifan) Zhang CS229, Stanford University December 11 th, 2011

Supervised Learning for Image Segmentation

3 Nonlinear Regression

Iteration Reduction K Means Clustering Algorithm

Overview. Non-Parametrics Models Definitions KNN. Ensemble Methods Definitions, Examples Random Forests. Clustering. k-means Clustering 2 / 8

Multi-label classification using rule-based classifier systems

CS5670: Computer Vision

Clustering part II 1

CSC411/2515 Tutorial: K-NN and Decision Tree

Generating Optimized Decision Tree Based on Discrete Wavelet Transform Kiran Kumar Reddi* 1 Ali Mirza Mahmood 2 K.

Nearest Neighbor Methods for Imputing Missing Data Within and Across Scales

A Generalized Method to Solve Text-Based CAPTCHAs

Transcription:

Real Estate Investment Advising Using Machine Learning Dr. Swapna Borde 1, Aniket Rane 2, Gautam Shende 3, Sampath Shetty 4 1 Head Of Department, Department Of Computer Engineering, VCET, Mumbai University, India 2Student, Department Of Computer Engineering, VCET, Mumbai University, India 3Student, Department Of Computer Engineering, VCET, Mumbai University, India 4Student, Department Of Computer Engineering, VCET, Mumbai University, India ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - The project makes a comparative study of various Machine Learning algorithms namely Linear Regression using gradient descent, K nearest neighbor regression and Random forest regression for prediction of real estate price trends. The aim of this paper is to examine the feasibility of these machine learning algorithms and select the most feasible one. To achieve the aim, parameters like Living Area, Number of rooms, Distance from airport/highway/station/major landmarks, Proximity to hospitals, Shopping options, Number of theaters, geographical location(harbor/central/western) are used as the input to the model and real estate price in the next quarters is the output variable. The quarterly data during 2005-2016 is employed as the data set to construct the model and the data has been obtained using Web Scraping from websites like 99acres.com, Magicbricks.com, Google.com. The experimental results on the training data set are used to compare the various algorithms based on error calculation using Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE) and Mean Absolute Error (MAE). Key Words: Linear Regression, K Nearest Neighbor (KNN), Random Forest algorithm, Decision Tree, forecast 1. INTRODUCTION Prices of real estate properties are critically linked with our economy. Accurately predicting real estate prices is not possible. However, prediction of real estate trends is a realistic prospect. Yet, we do not have accurate measures of housing price trends based on the vast amount of data available. In Mumbai alone there are around 10,000 current listings of 350 areas or more at 99acres.com. This rich dataset should be sufficient to establish a regression model to accurately predict the real estate prices in Mumbai. A property s appraised value is important in many real estate transactions such as sales, loans, and its marketability. Traditionally, estimates of property prices are often determined by professional appraisers. The disadvantage of this method is that the appraiser is likely to be biased due to vested interest from the lender, mortgage broker, buyer and seller. Therefore, an automated prediction system can serve as an important third party source which is not biased. For the buyers of real estate properties, an automated price prediction system can be useful to find under/overpriced properties currently on the market. This can be useful for first time buyers with relatively little experience, and suggest purchasing strategies for buying properties. This paper makes a comparative study of the three mentioned algorithms viz. Linear Regression using gradient descent, KNN Regression, Random forest regression for analyzing the trends. The data set extracted is split into training set and testing set in a ratio of 80:20 or 4:1. Finally, based on the conclusions drawn from the comparative study of the algorithms are used to develop a front end that suggests the user areas that would be most profitable for investment. On the front end, the user is asked for parameters such as Total budget and Total Area and based on the prediction of the prediction model which implements the most feasible algorithm for our data set, the user is provided with suggestions for investment 2. PREDICTION BASED ON LINEAR REGRESSION USING GRADIENT DESCENT Linear Regression principle is basically used for prediction and forecasting. Being the simpler and basic technique as compared to other machine learning algorithms, the implementation is less complex but the degree of error is slightly above the average. In this paper, we focus on Liner Regression using Gradient Decent for regression and forecast. Linear Regression using Gradient Descent is a learning machine which estimates a function according to a given data set G={(x i, y i)} n, where x i denotes the input vector, y i denotes the output value and n denotes the total number of the data. If the learning machine is working on multiparameters, x i denotes the input matrix and y i denotes the output vector. 2017, IRJET Impact Factor value: 5.181 ISO 9001:2008 Certified Journal Page 1821

training set such that parameter (size in feet) is plotted on the X axis and the prices are plotted on Y axis. The blue line is the prediction line(hypothesis). So basically in linear regression learning machine, we need to fit the training data set with the best fit line which we call the hypothesis in our paper. Figure 1.1 For hypothesis, we need to know the values of 0 and 1 so that for each value of x we can predict the best possible value of corresponding y. We need to evaluate the cost function (J) for set of data pairs to find the coefficients value. For the error to be minimum, we need to minimize the cost function (J), such that the coefficients which give the minimum cost function are selected. We used gradient descent algorithm to minimize the cost function. So the Gradient Descent algorithm will give values of coefficients for the hypothesis. Gradient descent algorithm: Figure 1.2 3. PREDICTION BASED ON KNN ALGORITHM K nearest neighbours is a simple algorithm that stores all available cases and predicts the numerical target based on a similarity measure (e.g., distance functions). KNN has been used in statistical estimation and pattern recognition already in the beginning of 1970 s as a non-parametric technique. A simple implementation of KNN regression is to calculate the average of the numerical target of the K nearest neighbors. Another approach uses an inverse distance weighted average of the K nearest neighbors. KNN regression uses the same distance functions as KNN classification. [9] Figure 1.1 demonstrates training set for a single parameter (size in feet) and the output (price). In Figure 1.2 we plot the 2017, IRJET Impact Factor value: 5.181 ISO 9001:2008 Certified Journal Page 1822

Overview of the Algorithm: 1) Fix K. Here K is the number of nearest neighbours that will be used for prediction. 2) Select method for distance calculation (Hamming Distance / Euclidean Distance / Minkowski / etc ) 3) Calculate weights of all vectors from the test vector. 4) Find the k closest vectors in the multidimensional system based upon the distances calculated. 5) Voting by the k nodes and estimation using a function like median or inverse weighted distance average. In our model we use the most common distance function i.e the Euclidean distance function. We also experimented with various values of K as it has been established that beyond a threshold value of K, there is no significance increase in the accuracy and the problem of over fitting and over-bias comes into the picture. An instance of this was also found in the study of the paper [1] The knn model in our system can be visualized as follows A decision tree is built using the top-down approach starting from a root node and at each stage the data is partitioned into subsets that contain instance with similar values. Each internal (non-leaf) node in the decision tree is labeled with an input feature. Based on the best split for an input feature the decisions are made and accordingly the tree is grown. The branches coming from a node labeled with an input feature are labeled with each of the possible values of the target or output feature or the branch leads to a subordinate decision node on a different input feature. The leaf node gives us the output based on the decisions made. In our case it would be the value of a property. Random forest algorithm takes the decision tree concept further by producing a large number of decision trees. The approach selects the training sample as well as a set of features randomly to grow each decision tree. The output of Random forest model is the average of the output of individual decision tree. The basic algorithm is as follows: This visualization can be extended to an n dimensional plot and the training set populates the n dimensional space. Later on, for prediction, we find the votes of the k closest neighbours in this n dimensional plot. 4. PREDICTION BASED ON RANDOM FOREST ALGORITHM Random forest algorithm is an ensemble learning method for regression and other tasks that makes use of decision tree learning and finding the mean prediction of the output of individual trees. 1) Select a set of training samples randomly from the complete training set. 2) Select a set of parameters at random out of all the possible parameters. (The above steps would make sure that all the parameters are given importance. Thus avoiding over-fitting the data) 3) Construct a Decision tree - Find the best split on the selected parameter - Make decision based on the split and grow the tree accordingly. The leaf node would give the predicted value. 4) Repeat the above steps for a number of decision trees (until the threshold value is reached after which the error value remains same). 5) Finally, find the mean of the output of individual decision tree which would give us the required prediction. 2017, IRJET Impact Factor value: 5.181 ISO 9001:2008 Certified Journal Page 1823

It has been established that there is a threshold beyond which there is no significant gain in accuracy as the number of trees increases as was also the case in the paper [1]. This helps us in deciding the number of trees to be generated by experimenting with the number of trees. 5. EVALUATION Linear Regression: Features- Year/Quarter, Distance to Airport, Distance to Altamount road, Distance to Vashi, Distance to Virar, Shopping mall count, Hospital Count Coefficients obtained 1)Using gradient descent - 293.539,-42.823,-472.687, 409.558, 219.353, 93.805, -127.294 Bias = 124.885794 2)Using least squares - 264.143, -40.785, -472.843, 373.372, 181.876, 64.645, -202.342 Bias = 4317.805 As expected, the features like distance to Altamount Road and Distance to Airport have negative coefficients as the price is expected to drop as we move away from these locations. It should be noted that Altamount is most valued real estate area in Mumbai. On the flip side, it can be seen that the Year/ Quarter and Distance to Vashi, Distance to Virar and number of shopping malls have positive coefficients because more the number of malls, more likely is the area to be developed, however it can be seen that the mall coefficient is not given too much of an importance because of the conflict that a developed area will have higher real estate pricing so it would also not be likely to have too many malls. It is obvious that increase in distance from places such as Virar and Vashi would most likely mean migration toward the Suburbs and Southern Mumbai which consequently results in the positive co-efficient. It is intuitive to think that increase in the number of hospitals would mean an increase in the price, however this is true only to some extent beyond which if the number of hospitals is more, then it s an indication that price is rather low in that area so as to construct so many hospitals. Since Linear Regression cannot distinguish this distinction between too many and fairly enough due to its linearity, it considers the overall effect which turns out to be that increase in number of hospitals leads to a net decrease in price. K-Nearest Neighbors: Error table for k = 2, 3,4,5,6 2 3 4 5 6 RMSE 0.016 0.019 0.020 0.023 0.024 MAE 0.079 0.092 0.097 0.105 0.110 MAPE 7.528 8.691 9.599 10.302 11.051 It can be seen that as the number of neighbours increases, the accuracy decreases and as the number of neighbours decreases, there is a gradual increase in the accuracy. As we increase the number of neighbours, we get a more generalized prediction however in our training set, it means the loss of accuracy. Hence, we preferred keeping k=4 which we found to be a good point for balancing the factor of generalization and accuracy. Random Forest: The random forest regression was found to have a very low error and fit the data very well. However, unexpectedly, it was not able to incorporate accurately the time/quarter feature. There is not a huge difference between predictions for a quarter in 2017 and a quarter in 2020. Thus even though it is able to predict near future trends with good accuracy, the predictions aren t coherent if we consider a prediction for (say) the next 6 quarters. Here, since we are only interested in predicting the trends for the next 2 or 3 quarters due to the dynamicity of the Real Estate pricing, this limitation specific to our data set is not a matter of concern. 2017, IRJET Impact Factor value: 5.181 ISO 9001:2008 Certified Journal Page 1824

Final table: Linear Regression using least squares Linear Regression using gradient descent K Nearest Neighbor (K=4) Random Forest RMSE 0.118 0.122 0.020 0.007 MAE 0.301 0.319 0.097 0.062 [4] R. J. Shiller, Understanding recent trends in house prices and home ownership, National Bureau of Economic Research. [5] S. C. Bourassa, E. Cantoni, and M. E. Hoesli, Spatial dependence, housing submarkets and house price prediction, 2007. [6] Course on Machine Learning, Andrew Ng(Linear Regression). Available:https://www.coursera.org/learn/machinelearning [7] The elements of statistical learning, Trevor Hastie - Random Forest Generation [8] K nearest neighbours, Sckitlearn.org [9] K nearest neighbours regression, http://www.saedsayad.com/k_nearest_neighbors_reg.ht m MAPE 40.089 45.925 9.599 6.328 6. CONCLUSION This paper proposes forecasting of Real Estate trends in Mumbai in near future by implementing regression using Random Forest algorithm as it was found to have the less error than the other algorithms that were experimented with, namely Linear Regression and K-nearest neighbors. The features used were Year/Quarter, Distance to Airport, Distance to Altamount road, Distance to Vashi, Distance to Virar, Shopping mall count, Hospital Count. The data which consisted of over 5000 samples was split into a 4:1 ratio for training and testing sets respectively. The prices of most recent quarters were used in the testing set. In future, besides adding more features such as traffic conditions and population density, we also intend to develop a user friendly GUI that can serve as an unbiased virtual broker for potential investors. We also plan to extend this model to other major cities in India like Bangalore, Chennai, Delhi and Kolkata with some changes in features that are specific to the considered city. REFERENCES [1] Pow, Emil Janulewicz and Liu Dave (Mc Gill University), Applied Machine Learning : Prediction of real estate properties in Montreal, Canada. [2] DA-YING LI1, WEI XU2, HONG ZHAO3 and RONG-QIU CHEN1, A SVR based forecasting approach for real estate price prediction, Proceedings of the Eighth International Conference on Machine Learning and Cybernetics, Baoding, 12-15 July 2009. [3] Aaron NG and Dr Mark Deisenroth (Imperial College, London), Machine Learning for a London housing Price Prediction Mobile Application. 2017, IRJET Impact Factor value: 5.181 ISO 9001:2008 Certified Journal Page 1825