Lessons Learned in the 2016 Kaggle Home Data Competition

, and
Posted on Aug 27, 2017

Our team had two prevailing theories concerning the ultimate goal of the “Kaggle Zillow Challenge” going into this project. 

(1) The challenge site describes how exploring the error can unmask useful insights about a model.  So maybe, predictions relating to the error would help the Zillow home site to tune their model (adjusting for the results of this competition).  But this first theory would make more sense if we were predicting error, not “log error” as calculated by:

             Log(Zestimate) - Log(SalesPrice) = LogError

(2) Zillow was being secretive and protective of their data and using this phase one of the competition as a litmus test to weed people out during phase one of the Kaggle competition before providing access to better data in phase two.  With 1.2 Million in prize money at stake, you have to figure there is a logic to what they were doing.  But after testing a myriad of linear models and having them all fail on the assumptions of “no collinearity” or normality of the distributions, it was easy to think that maybe they were just messing with us.

Initially, we spent days on data cleaning.  Looking at the data provided, this begged the question, “is anything not missing?”  The answer was a resounding “no”.  The only fields where the data was 100% present were the parcelID (unique identifier for each house) and the log error / transaction dates provided in the training data. 

A few highlights from our data munging experiments:

  1. TaxDelinquencyYear:  the field contained a 1 to 2 digit year that was first converted to a standard 4-digit year.  Then a calculation was run to engineer a feature representing how many years delinquent a property was in its taxes (if any).  NA was assumed to be 0.  The data was all from 2016 so if the delinquency year was 2016, then it got a 1 for first year of delinquency, 2 for second if 2015 and so on … 
  2. Corplots established the appearance of linear relationships between fields.  This led to a slew of linear model imputation experiments.  However,  all of these produced R squared values that were so poor, they almost resembled significant p-values (many decimals places below 1%).  But not surprisingly, our team did get one such model to work establishing a 90% R square value on a significant p-value for a model predicting taxes paid in terms of tax dollar value for the property.  This model was then used to impute missing values for that field.

These are just a few highlights.  A great deal of effort went into analyzing every field, coming up with a strategy, and imputing or dropping the field as appropriate.  In the end, it is questionable how much bang we actually got for our buck with respect to all the work that went into this.  Then the real analytical experimentation began.

Our team explored linear models and linear models with transformation including the “Yeo Johnson” transformation.  This transformation was selected because it could address the issue that Box-Cox can’t handle negative values. 

With high hopes, our team added to these experiments with regularization using Ridge, Lasso, and Elastic Net.  The team also ran random forest, gradient boosting and XGBoost models as well.  A point of humor among the team was in connection with one of the first models we tried to test the Kaggle submission process.  Dubbed “Will’s Stupid Model", it was a simplistic linear model calculating logerror in terms of just two fields:  calculated finished square feet, and year built.  As poor as this model did, it set our high score on Kaggle that we were almost unable to beat by any other experiment we tried until almost the end.  And in the end when we finally did beat it, it was only by combining the results of this very same model with GBM by averaging the predictions of the two models together.  This final experiment raised our ranking in the Kaggle competition by 95 places boosting us to 1297th place.  Million dollar prize money here we come! 

Educationally, as data scientists, this experience was an opportunity to experiment and try many different things even if at times it felt like the deck was stacked against us in terms of producing truly meaningful results.  Along the way, our EDA meandered into exploring the question of missingness itself as a predictor of logerror.  

Missingness As A Variable - Graph

Though this experiment did not bear fruit in terms of producing a viable model, it was an interesting exploration of the data (as shown above).  So what’s the number one thing we learned from this whole experience?

Though Data Science is about finding statistically significant evidence within the data, maybe it still pays to trust your instincts.  From the very beginning, this whole competition felt like a fool's errand.  The one team at the Academy who truly produced the best and most interesting results, chose to ignore what the Kaggle contest was all about, and just attempt to predict home value from the data points given.

About Authors

Mitch

Mitch Abramson has served as: Business Writer/Techwriter, Researcher, Editor, Problem Solver, Tinkerer, Communicator, Code Hacker, System Administrator, Trainer, Content Strategist, XML Reuse Architect and facilitator of projects and initiatives. He jokes that his career took him from being...
View all posts by Mitch >

Related Articles

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