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

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp