<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Steve Huang on Medium]]></title>
        <description><![CDATA[Stories by Steve Huang on Medium]]></description>
        <link>https://medium.com/@stevehuang_46512?source=rss-e49b006914d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*jYrt4j5v3bKpic0Q.</url>
            <title>Stories by Steve Huang on Medium</title>
            <link>https://medium.com/@stevehuang_46512?source=rss-e49b006914d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 18:09:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stevehuang_46512/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Self Learning Data Science. Housing Price Prediction Project for Kaggle]]></title>
            <link>https://medium.com/@stevehuang_46512/self-learning-data-science-housing-price-prediction-project-for-kaggle-41741ac2f7ee?source=rss-e49b006914d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/41741ac2f7ee</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[towards-data-science]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[kaggle]]></category>
            <dc:creator><![CDATA[Steve Huang]]></dc:creator>
            <pubDate>Fri, 11 May 2018 00:13:30 GMT</pubDate>
            <atom:updated>2018-05-11T00:13:32.437Z</atom:updated>
            <content:encoded><![CDATA[<p>I am a Data Analyst by trade and to get to the next level of my career, I started self studying data science a little while ago. This is my first attempt at a project on Kaggle. Blogging is an important step of the journey to learning Data Science so I decided to share my journey so far by talking about this project.</p><h3>Data Exploration</h3><p>The Housing Price Prediction project data can be found <a href="https://www.kaggle.com/c/house-prices-advanced-regression-techniques">here</a>. First thing I did after downloading the data as all steps to a new project should be is to explore and get familiar with the data. The csv split out to a panda shape of (1459, 81) for the training data. Which means there are 1459 samples and 81 columns. I started by looking at SalePrice and can see it’s skewed. Regression analysis generally requires normally distributed data to be useful in predictive modeling and thus my first task was to unskew it with logorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*T7X9Eql3QByzA_wuADjAbQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*SRyrDmb_TImag8_CEZt5rw.png" /><figcaption>Correcting skewness (fig. 1)</figcaption></figure><p>Discounting the ID and SalePrice column, it means we have 79 features to that can potentially affect the model. With 37 numeric ones. Next thing I did is to look at a standard heat map for the numeric variables using the .corr() method. I did not like the standard white to black default map very much as both negative and positive correlation matters in our case, so I used a custom me that feels more intuitive to our needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*S8UaxiWpg-mDQx_vkv10XA.png" /><figcaption>Correlation Heatmap (fig. 2)</figcaption></figure><p>Seems like OverallQual, TotalBsmtSF, KitchenAbvGr, along with garage data are pretty important.</p><h3>Data Engineering</h3><p>For feature engineering, I first checked for NaNs, and saw that some columns (like PoolArea) have majority Nan, which make sense as most houses do not contain pools. I decided that any column with over 200 NaN rows are unreliable for modeling and removed them. The rest I filled with the mean value for the numeric variables.</p><p>Same logic regarding skewness for the SalePrice applies to the rest of the continuous data. A curve’s positive skewness is considered medium at .5 and high skewed at 1, same for the negative skewness at -.5 and -1. After some trial and error, I decided to apply log to any data with a absolute value skewness above .5.</p><p>For categoric variables, I manually defined which are ordinal and which are nominal. I used Labelencoder to change the Ordinal variables to numerics values with an ordering significance. Nominal values I used the get_dummies function to quickly change them into binary values for each possible category results within a variable.</p><h3>Modeling</h3><p>I used RandomForestRegressor as my model and cross_val_score for my score validation with CV set on 15 folds. I used the mean_squared_error scoring method, which resulted in an average score of .136. Using GridSearchCV, I played around with some parameters for max_depth, n_estimator, max_feature, etc, and was able to lower the score to .134. Below imagine is an example where trying out different max_depth show the best score is at 15.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*1ticvn606uwSBsKXNCLjwQ.png" /></figure><p>Submitting the test data onto Kaggle put me at around the top 40% range.</p><h3>Future Exploration Potential</h3><p>Some idea I have to further improve the fit in the future:</p><ul><li>Dig deeper into features and do some creative feature engineering.</li><li>Try other models like Ridge or elasticNet regression, maybe bagging or boosting like XGBoost.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41741ac2f7ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>