What Is A Home Worth? A Machine Learning Approach.

, 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.


Best RMSE Score

Stacked Model










Random Forest


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 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

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 >

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 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis 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 seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI