<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><generator uri="http://jekyllrb.com" version="3.2.1">Jekyll</generator><link href="http://somethingsconsidered.github.io//feed.xml" rel="self" type="application/atom+xml" /><link href="http://somethingsconsidered.github.io//" rel="alternate" type="text/html" /><updated>2016-10-17T13:18:42+00:00</updated><id>http://somethingsconsidered.github.io//</id><title>Some Things Considered</title><subtitle>Matt Cannon's Analytics Blog</subtitle><entry><title>Autism Social Media Analysis</title><link href="http://somethingsconsidered.github.io//blog/2016/10/18/Autism-Social-Media-Analysis" rel="alternate" type="text/html" title="Autism Social Media Analysis" /><published>2016-10-18T00:00:00+00:00</published><updated>2016-10-18T00:00:00+00:00</updated><id>http://somethingsconsidered.github.io//blog/2016/10/18/Autism-Social-Media-Analysis</id><content type="html" xml:base="http://somethingsconsidered.github.io//blog/2016/10/18/Autism-Social-Media-Analysis">&lt;p&gt;I haven’t posted here recently, partially due to work that I’ve been doing with social media analysis applied to autism solution providers.  &lt;a href=&quot;http://autismsocialmediaanalysis.com/&quot; a=&quot;&quot;&gt; A blog related to that work can be found here. &lt;/a&gt;&lt;/p&gt;</content><summary>I haven’t posted here recently, partially due to work that I’ve been doing with social media analysis applied to autism solution providers.   A blog related to that work can be found here.</summary></entry><entry><title>Insights Blog: Realtor Comments and Property Condition</title><link href="http://somethingsconsidered.github.io//blog/2016/10/17/Better-Late-Than-Never" rel="alternate" type="text/html" title="Insights Blog: Realtor Comments and Property Condition" /><published>2016-10-17T00:00:00+00:00</published><updated>2016-10-17T00:00:00+00:00</updated><id>http://somethingsconsidered.github.io//blog/2016/10/17/Better-Late-Than-Never</id><content type="html" xml:base="http://somethingsconsidered.github.io//blog/2016/10/17/Better-Late-Than-Never">&lt;p&gt;Back in July,  added an entry to CoreLogic’s Insights blog looking at &lt;a href=&quot;http://www.corelogic.com/blog/authors/matt-cannon/2016/07/turning-words-into-data-part-ii.aspx#.WATNupMrKgQ&quot; a=&quot;&quot;&gt; realtor comments for distressed listings. &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I made a few changes compared to the earlier post, such as adding zip level control variables within the county.  In the previous post, words associated with neighborhoods dominated the bag of words model.  With the inclusion of zip dummy variables, the text variables were more likely to pick up property condition or amenity effects.&lt;/p&gt;</content><summary>Back in July,  added an entry to CoreLogic’s Insights blog looking at  realtor comments for distressed listings.</summary></entry><entry><title>Insights Blog: Realtor Comments and Hedonic Regression</title><link href="http://somethingsconsidered.github.io//blog/2016/01/18/Insights-Blog-MLS-Text" rel="alternate" type="text/html" title="Insights Blog: Realtor Comments and Hedonic Regression" /><published>2016-01-18T00:00:00+00:00</published><updated>2016-01-18T00:00:00+00:00</updated><id>http://somethingsconsidered.github.io//blog/2016/01/18/Insights-Blog-MLS-Text</id><content type="html" xml:base="http://somethingsconsidered.github.io//blog/2016/01/18/Insights-Blog-MLS-Text">&lt;p&gt;I recently added an entry to CoreLogic’s Insights blog which examined &lt;a href=&quot;http://www.corelogic.com/blog/authors/matt-cannon/2016/01/turning-words-into-data.aspx#.Vp1glXhcKeA&quot; a=&quot;&quot;&gt; realtor comments and property listings. &lt;/a&gt;  The analysis was fairly high level, but provided an introduction regarding how information contained in listing agent comments could improve house price estimation via &lt;a href=&quot;https://en.wikipedia.org/wiki/Hedonic_regression&quot; a=&quot;&quot;&gt; hedonic regression&lt;/a&gt;.  Specifically, I regressed the log of house price against the number of bedrooms, bathrooms, living space, and a bag of words based on the realtor comments. More information can be found on CoreLogic’s Insights blog page.&lt;/p&gt;

&lt;p&gt;The R code estimating the regression (using glmnet) and generating word clouds of the most important words can be found &lt;a href=&quot;https://github.com/SomeThingsConsidered/MLS_text_analysis/blob/master/hedonic_regression_1.R&quot; a=&quot;&quot;&gt; here. &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also created code to identify listings containing a specific word, and then print the entire realtor comment containing the word.  This was useful in examining the context in which a word was used (i.e. “swamp” was used describe a cooling method– swamp coolers).  Code &lt;a href=&quot;https://github.com/SomeThingsConsidered/MLS_text_analysis/blob/master/check_corpus_entries.R&quot; a=&quot;&quot;&gt; can be found here. &lt;/a&gt;&lt;/p&gt;</content><summary>I recently added an entry to CoreLogic’s Insights blog which examined  realtor comments and property listings.   The analysis was fairly high level, but provided an introduction regarding how information contained in listing agent comments could improve house price estimation via  hedonic regression.  Specifically, I regressed the log of house price against the number of bedrooms, bathrooms, living space, and a bag of words based on the realtor comments. More information can be found on CoreLogic’s Insights blog page.</summary></entry><entry><title>Insights Blog: Property Tax Overview</title><link href="http://somethingsconsidered.github.io//blog/2016/01/01/Insights-Blog-Property-Tax-Overview" rel="alternate" type="text/html" title="Insights Blog: Property Tax Overview" /><published>2016-01-01T00:00:00+00:00</published><updated>2016-01-01T00:00:00+00:00</updated><id>http://somethingsconsidered.github.io//blog/2016/01/01/Insights-Blog-Property-Tax-Overview</id><content type="html" xml:base="http://somethingsconsidered.github.io//blog/2016/01/01/Insights-Blog-Property-Tax-Overview">&lt;p&gt;I recently contributed an entry to CoreLogic’s Insights blog.   &lt;a href=&quot;http://www.corelogic.com/blog/authors/matt-cannon/2015/12/national-property-tax-delinquency-declining.aspx#.Vob4QZMrI_U&quot; a=&quot;&quot;&gt; The blog entry &lt;/a&gt;  provided a brief overview of property taxes and summarized national property tax delinquency trends over time.  The entry wasn’t overly technical, but property tax delinquency is an interesting topic for analysis.  We’ve found that property tax delinquency can be used to predict future mortgage delinquency.  An inability to pay property taxes can indicate financial stress by the homeowner, which could carry over to difficulty meeting mortgage payment obligations. However, it is important to account for the fact that property tax penalties vary by municipality.  Tax penalties include interest on delinquent taxes and, eventually, possible foreclosure on the property.  In some cases, the interest penalty may be very low and the time period until foreclosure is initiated may be very long.  In such instances, homeowners may strategically elect to enter into some period of delinquency (for example, investors who choose to use funds elsewhere).  In such cases, the correlation between tax delinquency and future mortgage delinquency would be weak.  Analysis that examines the link between tax and mortgage delinquency should account for municipality specific penalty factors.&lt;/p&gt;</content><summary>I recently contributed an entry to CoreLogic’s Insights blog.    The blog entry   provided a brief overview of property taxes and summarized national property tax delinquency trends over time.  The entry wasn’t overly technical, but property tax delinquency is an interesting topic for analysis.  We’ve found that property tax delinquency can be used to predict future mortgage delinquency.  An inability to pay property taxes can indicate financial stress by the homeowner, which could carry over to difficulty meeting mortgage payment obligations. However, it is important to account for the fact that property tax penalties vary by municipality.  Tax penalties include interest on delinquent taxes and, eventually, possible foreclosure on the property.  In some cases, the interest penalty may be very low and the time period until foreclosure is initiated may be very long.  In such instances, homeowners may strategically elect to enter into some period of delinquency (for example, investors who choose to use funds elsewhere).  In such cases, the correlation between tax delinquency and future mortgage delinquency would be weak.  Analysis that examines the link between tax and mortgage delinquency should account for municipality specific penalty factors.</summary></entry><entry><title>Social Network Analysis</title><link href="http://somethingsconsidered.github.io//blog/2015/12/21/star-wars-social-network" rel="alternate" type="text/html" title="Social Network Analysis" /><published>2015-12-21T00:00:00+00:00</published><updated>2015-12-21T00:00:00+00:00</updated><id>http://somethingsconsidered.github.io//blog/2015/12/21/star-wars-social-network</id><content type="html" xml:base="http://somethingsconsidered.github.io//blog/2015/12/21/star-wars-social-network">&lt;p&gt;This page contains an interesting application of social network analysis &lt;a href=&quot;http://evelinag.com/blog/2015/12-15-star-wars-social-network/#.VnhBkXhcKeA&quot; a=&quot;&quot;&gt;applied to characters in the Star Wars movies&lt;/a&gt;.  I’ve had limited exposure to social network analysis, but I think that an interesting application could be examining home appraisal data. When estimating the value of a home that is for sale, appraisers select nearby recent sales to serve as points of reference.  Data related to nearby homes used as comps to a subject property for sale could be used to evaluate how the homes are linked.  This could provide information on things like neighborhood boundaries.  Appraisers who select the comparable properties are familiar with the neighborhood, and may not select properties that are geographically close, but separated by other factors (e.g. school district, railroad tracks etc.).  An examination of properties that are geographically close but not closely related in terms of network analysis could provide insight into neighborhood boundaries.  This is something that I’d like to examine in the upcoming year.&lt;/p&gt;</content><summary>This page contains an interesting application of social network analysis applied to characters in the Star Wars movies.  I’ve had limited exposure to social network analysis, but I think that an interesting application could be examining home appraisal data. When estimating the value of a home that is for sale, appraisers select nearby recent sales to serve as points of reference.  Data related to nearby homes used as comps to a subject property for sale could be used to evaluate how the homes are linked.  This could provide information on things like neighborhood boundaries.  Appraisers who select the comparable properties are familiar with the neighborhood, and may not select properties that are geographically close, but separated by other factors (e.g. school district, railroad tracks etc.).  An examination of properties that are geographically close but not closely related in terms of network analysis could provide insight into neighborhood boundaries.  This is something that I’d like to examine in the upcoming year.</summary></entry><entry><title>CoreLogic Blogging in 2016</title><link href="http://somethingsconsidered.github.io//blog/2015/12/11/corelogic-blogging-2016" rel="alternate" type="text/html" title="CoreLogic Blogging in 2016" /><published>2015-12-11T00:00:00+00:00</published><updated>2015-12-11T00:00:00+00:00</updated><id>http://somethingsconsidered.github.io//blog/2015/12/11/corelogic-blogging-2016</id><content type="html" xml:base="http://somethingsconsidered.github.io//blog/2015/12/11/corelogic-blogging-2016">&lt;p&gt;One of my goals in 2016 it to contribute on a regular basis to the &lt;a href=&quot;http://www.corelogic.com/blog/#.VmrwKBorKgQ&quot; a=&quot;&quot;&gt; economic and real estate blog &lt;/a&gt; at work.  The company doesn’t allocate much time for independent research, but it’s possible to write blog posts that relate to analysis performed as part of the job.  For example, I’ve drafted a few posts related to property tax delinquency rates and mortgage servicer performance, which should be published in early 2016.  It’s also possible to use ‘nights and weekends’ to write something that is less directly tied to my ‘day job’. Given CoreLogic’s wealth of data, there are a lot of interesting questions that can be investigated.  One of the first things that I’d like to write about is using realtor comments in MLS data to improve home price estimation.  Hopefully, I will be able to publish a few blogs on that topic in early 2016.  There are &lt;a href=&quot;http://www.be.wvu.edu/phd_economics/pdf/15-34.pdf&quot; a=&quot;&quot;&gt; several papers &lt;/a&gt; that have  &lt;a href=&quot;http://www-stat.wharton.upenn.edu/~stine/research/regressor.pdf&quot; a=&quot;&quot;&gt; examined the topic&lt;/a&gt;, but it would be interesting to write code to gain hands-on experience and to see how my results compare to the existing literature.&lt;/p&gt;</content><summary>One of my goals in 2016 it to contribute on a regular basis to the  economic and real estate blog  at work.  The company doesn’t allocate much time for independent research, but it’s possible to write blog posts that relate to analysis performed as part of the job.  For example, I’ve drafted a few posts related to property tax delinquency rates and mortgage servicer performance, which should be published in early 2016.  It’s also possible to use ‘nights and weekends’ to write something that is less directly tied to my ‘day job’. Given CoreLogic’s wealth of data, there are a lot of interesting questions that can be investigated.  One of the first things that I’d like to write about is using realtor comments in MLS data to improve home price estimation.  Hopefully, I will be able to publish a few blogs on that topic in early 2016.  There are  several papers  that have   examined the topic, but it would be interesting to write code to gain hands-on experience and to see how my results compare to the existing literature.</summary></entry><entry><title>KDD Cup 2015</title><link href="http://somethingsconsidered.github.io//blog/2015/12/07/KDDCup-2015" rel="alternate" type="text/html" title="KDD Cup 2015" /><published>2015-12-07T00:00:00+00:00</published><updated>2015-12-07T00:00:00+00:00</updated><id>http://somethingsconsidered.github.io//blog/2015/12/07/KDDCup-2015</id><content type="html" xml:base="http://somethingsconsidered.github.io//blog/2015/12/07/KDDCup-2015">&lt;p&gt;Analytic competitions, such those hosted by Kaggle, provide opportunities to test and compare different algorithms for building predictive models.  A few months ago, I participated in the &lt;a href=&quot;http://kddcup2015.com/information.html&quot; a=&quot;&quot;&gt; 2015 KDD Cup &lt;/a&gt;  with &lt;a href=&quot;https://www.linkedin.com/in/jianjun-xie-a34a073&quot; a=&quot;&quot;&gt; a colleague &lt;/a&gt; at CoreLogic.&lt;/p&gt;

&lt;p&gt;The KDD Cup is a competition associated with the annual Knowledge Discovery and Data Mining conference.  The topic of the 2015 KDD Cup was predicting dropouts in Massive Open Online Courses (MOOC).  Dropout rates in MOOCs are very high, and &lt;a href=&quot;http://wrap.warwick.ac.uk/65543/&quot; a=&quot;&quot;&gt;numerous research papers &lt;/a&gt;  have investigated &lt;a href=&quot;http://www.editlib.org/p/147656/&quot; a=&quot;&quot;&gt;reasons for this behavior&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Data were provided from XuetangX, a Chinese MOOC learning platform.  The outcome metric was course dropout during the next 10 days.  Information was provided about the course and student activity over time.  Student information included a record over time of participation in various aspects of the course (discussion forum, quiz etc).  A student ID was provided and could be used to link records for a given student across courses.  This could be used to calculate metrics such as student-level completion rates across courses as model inputs.&lt;/p&gt;

&lt;p&gt;The analytic team at CoreLogic had previously used the Kaggle &lt;a href=&quot;https://www.kaggle.com/c/bike-sharing-demand&quot; a=&quot;&quot;&gt; bike sharing demand competition &lt;/a&gt; as a team-building exercise.   In that exercise, I had taken the approach of segmenting the data (by casual vs registered bike user, workday vs non workday, and season) and then estimating a negative binomial regression for each segment (&lt;a href=&quot;https://stat.ethz.ch/R-manual/R-devel/library/MASS/html/glm.nb.html&quot; a=&quot;&quot;&gt;using the glm.nb function&lt;/a&gt; in R).  My colleague used a generalized boosted regression in his approach.  Blending our models to predict bike demand provided superior results than either of the individual approaches.&lt;/p&gt;

&lt;p&gt;Given our favorable results in the bike sharing contest, we decided to take a similar approach in the KDD Cup 2015 contest.  My colleague once again used GBM to estimate his models.  My approach was to segment the data, and use logistic regression to estimate the dropout probability.  I segmented the data by course, which removed any course-level effects in the estimation process (i.e. there was no course level variation within a regression dataset).  An additional important factor was the amount of times a student logged on to the course site.  A significant number of students logged on to the course only one time.  These students exhibited a significantly higher dropout rate than students who logged on to the course multiple times.  It was also possible to generate additional explanatory variables (features) for students with multiple logons (e.g. time between log ons, number of log ons by type of log on). For this reason, I also segmented the data by multiple vs single log on.&lt;/p&gt;

&lt;p&gt;I used the &lt;a href=&quot;https://cran.r-project.org/web/packages/glmnet/index.html&quot; a=&quot;&quot;&gt; glmnet package in R &lt;/a&gt; to estimate a logistic regression with a penalty function.  The glmnet function can be used to estimate Lasso regression, ridge regression, as well as a combination of the two.  My intention in using glmnet was to use Lasso, or a function of Lasso, for variable reduction.&lt;/p&gt;

&lt;p&gt;I’ve uploaded the R code for estimating glmnet &lt;a href=&quot;https://github.com/SomeThingsConsidered/KDDCup2015/blob/master/glmnet_KDDCup2015.R&quot; a=&quot;&quot;&gt; here. &lt;/a&gt;  I did some pre-procesing of the data using SAS, so the R code highlights the use of glmnet, rather than being complete code that reads in the raw data and creates features.&lt;/p&gt;

&lt;p&gt;There are several points to highlight from the code:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;I selected area under the curve (AUC) to evaluate the model performance. glmnet allows you to choose from several different evaluation metrics.  The competition used AUC as the evaluation metric, so I was able to select the same metric to evaluate my models as was used to judge the competition results.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I used K folds cross validation to evaluate the model performance.  K folds cross validation divides the data into K datasets, estimates the model on K-1 data, validates on the Kth data, repeats for each grouping, and takes the average of the validation results. The package uses the cross validation results to select the best parameter for the penalty term in the function.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I used a combination of lasso and ridge regression (alpha of 0.5).  I had also tried alpha =1 (lasso) and alpha =0 (ridge), but 0.5 provided the best CV results.  My understanding is that the &lt;a href=&quot;https://cran.r-project.org/web/packages/c060/c060.pdf&quot; a=&quot;&quot;&gt; c060 package &lt;/a&gt; can perform alpha tunig, but I did not have time to investigate.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;K folds cross validation results can vary across draws of the data, especially for small datasets.  For this reason, the process was repeated 50 times, and the median result was selected.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, this approach resulted in AUC metrics that were 0.01 - 0.02 below my colleague’s approach of using GBM.  Given the AUC differences, combining the model approaches did not improve results relative to using GBM alone.  My guess is that glmnet did not perform as well as GBM because non-linearities and variable interactions need to be specified as model input variables, rather than allowing the algorithm to find nonlinearities and/or interactions.&lt;/p&gt;

&lt;p&gt;Overall, the competition was a fun and useful exercise. I’m interested in learning more about using Lasso in the presence of collinearity of the features (explantory variables).  When I tried using all of the features as inputs to the glmnet equation, the results were worse than when I selected a subset, removing highly correlated variables. If Lasso can be used as a method of variable selection, it would be interesting to learn how much preprocessing of the data is required.&lt;/p&gt;</content><summary>Analytic competitions, such those hosted by Kaggle, provide opportunities to test and compare different algorithms for building predictive models.  A few months ago, I participated in the  2015 KDD Cup   with  a colleague  at CoreLogic.</summary></entry><entry><title>Setting up</title><link href="http://somethingsconsidered.github.io//blog/2015/11/30/initial-test" rel="alternate" type="text/html" title="Setting up" /><published>2015-11-30T00:00:00+00:00</published><updated>2015-11-30T00:00:00+00:00</updated><id>http://somethingsconsidered.github.io//blog/2015/11/30/initial-test</id><content type="html" xml:base="http://somethingsconsidered.github.io//blog/2015/11/30/initial-test">&lt;p&gt;I have very little experience working with web pages, but there is a lot of available info about using Jekyll and Poole to create a site on Github. I used &lt;a href=&quot;http://jmcglone.com/guides/github-pages/&quot; a=&quot;&quot;&gt;  Creating and Hosting a Personal Site on GitHub &lt;/a&gt; by Jonathan McGlone for the initial setup of this site.  &lt;a href=&quot;http://joshualande.com/jekyll-github-pages-poole/&quot; a=&quot;&quot;&gt; How I Created a Beautiful and Minimal Blog Using Jekyll, Github Pages, and poole &lt;/a&gt; by Joshua Lande also contains useful tips.&lt;/p&gt;</content><summary>I have very little experience working with web pages, but there is a lot of available info about using Jekyll and Poole to create a site on Github. I used   Creating and Hosting a Personal Site on GitHub  by Jonathan McGlone for the initial setup of this site.   How I Created a Beautiful and Minimal Blog Using Jekyll, Github Pages, and poole  by Joshua Lande also contains useful tips.</summary></entry></feed>
