What Is A Home Worth? A Machine Learning Approach.

Michael Sankari
Wanxin Ye
Avatar
, and
Posted on Mar 21, 2019

We examine a data set of home sales in Aimes, Iowa to determine which features are the most significant in setting a home's price. This information is useful to homeowners, real estate agents, appraisers and insurers.

As with any data science task, our first task was to examine and clean the data. We strongly suspected that the relationship would be linear so our work focused on transforming the data to satisfy the requirements for linear regression. For example, the Sale Price, our dependent variable, was skewed to the right, so we applied a log transformation to bring the distribution closer to normal.

Next, was feature engineering and selection. The data set was rich with features, such as number of half baths and number of full baths. As one may expect, such granular detail was not necessary, so we combined them into a single "number of baths" feature. Furthermore, there were numerous descriptions of the pools available in certain homes. However, the most important element was simply whether there was a pool or not, so we simplified this into a simple binary feature, 1 if there was a pool, 0 otherwise.

For feature selection, we relied on Lasso regression and Variance Inflation Factor analysis. The former was much more effective so we used the suggestions obtained from it.

At this point, we went about tuning our model using Grid Search and selected others including, Ridge, Random Forest and XGBoost. 

As expected, we found the linear relationship was the best, so our best results were from Lasso and Ridge. For this reason, Random Forest and XGBoost did not perform as well since they do not assume the underlying relationship is linear.

Model

Best RMSE Score

Stacked Model

0.1169

Lasso

0.1189

Ridge

0.1201

XGB

0.1256

VIF

0.1422

Random Forest

0.1449

However, as seen above, once we stacked these models using a weighted average, we were able to improve our performance as measured by RMSE.

About Authors

Michael Sankari

Michael Sankari

Michael is a Certified Data Scientist with experience in R, Python and SQL. Furthermore, he has a strong background in the finance and real estate industries and loves using analytics to make better decisions.
View all posts by Michael Sankari >
Wanxin Ye

Wanxin Ye

Christina(Wanxin) graduated from Columbia University where she studied Ed policy and Data Analysis. She enjoy using data science to solve real-world problems and she has working experience in data analytics and she is active in participating datathons and...
View all posts by Wanxin Ye >
Avatar

Shehryar Khawaja

Shehryar Khawaja received his BS in Decision Science from Carnegie Mellon University. His experience has primarily been in operations and business development, holding leadership roles at a company providing technological solutions. After completing his MBA from IE University,...
View all posts by Shehryar Khawaja >

Leave a Comment

Your email address will not be published. Required fields are marked *

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags