Condo Prince R Machine Learning class Final Project
The skills we demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
The Meetup this past Tuesday was held in the NYC Data Science Academy space near Grand Central Station. Yi Wang gave a presentation on his machine learning final project. He was part of a machine learning in R class held through the NYC Data Science Academy. His project was to build a model that would predict the value of individual condos along the Hudson in New Jersey. Using data from many different sources, he collected many different data points about each condo and the buildings they were in and used these to build several different models for predicting the value of any given condo.
You can view the slides of his presentation online here.
The Data
The data sources for this project were a combination of public access data as well as data from the civic hacking group Beta NYC. The sale price of all condo purchases are public record and can be found using the search function of NJ MOD IV (the equivalent for NYC is called Acris). For his project, Yi grabbed only the most recent sales, ignoring older ones.
This data was less than clean, however. Some listings had obviously incorrect records, such as a sales price of $10. In addition, the addresses of the condos was a plain text string that had to be deciphered and sometimes unscrambled. In addition, the condo number and floor number could be inferred from the listing.
Sources of other data included the Google Maps API (for computing coordinates associated with addresses). Walkscore.com was used to grab the “walkability score” (walking convenience) associated with any condo building by inputting its address. He also used publicly available census data.
In addition to, Yi used the number of units in the building, the year built, as well as the price per square foot of the most recent sale. (This price per square foot value was not differentiated by floor, which the model was designed to take into account.) In addition, Yi calculated the distance of the building from the Hudson waterfront as well as distance from the nearest Path station (the special subway connecting NJ to downtown Manhattan that many use for commuting), since both of these should affect the market value.
After all is said and done, 89% of existing condos were covered in the data, while the rest were presumably lost due to noisy data.
After spending some time modeling without much success, Yi realized his models were inaccurate because he was missing an important value that affected sales price: the view. Some condos had a view of the Hudson and downtown Manhattan to the east, whereas others looked west over New Jersey, the former view being more highly valued. He found floor plans for the condos and assigned each unit a score corresponding to its view: a 2 corresponding to an ideal view, a 1 to a partial view, and a 0 designated a view of nothing special.
In addition, Yi needed some way of taking into account how condo prices changed over time with the market. To do this, he simply used the data he had acquired about the price per square foot and calculated a rough index of how the market developed over time.
Modeling
The models were designed to predict the current price per square foot of each condo (which is roughly in the $500s). Yi decided to use Partial Least Squares Fit (PLSF) to grade the fit each model had with the data. He used four different modeling methods, some were more accurate than others. He used multi-linear regression, Model Tree, GBM, and Random Forest.
Multi-Linear Regression | 99.17 |
Model Tree | 86.64 |
GBM | 90.6 |
Random Forest | 64.50 |
To produce these models, Yi used his entire data set. To ensure that the models were not overfitting the data, he did a check where training and test data was clearly separated. The models were robust through this check.