Skip to content

Commit

Permalink
Create master branch via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr. Yap authored Oct 11, 2016
1 parent 9ae33c3 commit a44113d
Show file tree
Hide file tree
Showing 4 changed files with 531 additions and 26 deletions.
214 changes: 189 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,203 @@
<!DOCTYPE html>
<html lang="en-us">
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Rtb by mryap</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">

<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-light.css">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<section class="page-header">
<h1 class="project-name">Rtb</h1>
<h2 class="project-tagline"></h2>
<a href="https://github.com/mryap/rtb" class="btn">View on GitHub</a>
<a href="https://github.com/mryap/rtb/zipball/master" class="btn">Download .zip</a>
<a href="https://github.com/mryap/rtb/tarball/master" class="btn">Download .tar.gz</a>
</section>

<section class="main-content">
<h1>
<div class="wrapper">
<header>
<h1>Rtb</h1>
<p></p>

<p class="view"><a href="https://github.com/mryap/rtb">View the Project on GitHub <small>mryap/rtb</small></a></p>


<ul>
<li><a href="https://github.com/mryap/rtb/zipball/master">Download <strong>ZIP File</strong></a></li>
<li><a href="https://github.com/mryap/rtb/tarball/master">Download <strong>TAR Ball</strong></a></li>
<li><a href="https://github.com/mryap/rtb">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1>
<a id="prediction-model-for-dublin-rental-price-movements" class="anchor" href="#prediction-model-for-dublin-rental-price-movements" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Prediction Model for Dublin rental price movements</h1>

<p>Explores the use of data mining techniques to analyse the trend and understand the underlying influencing factors of Ireland property rental market. </p>
<p>Using Azure Machine Learning studio and R’s Caret package to explores the use of data mining techniques to analyse the trend and understand the underlying influencing factors of Ireland property rental market. </p>

<p>Transaction data from publicly available Private Residential Tenancies Board (PRTB) rent index from 2005 to 2015 were used and built prediction models using regression algorithms. </p>

<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/mryap/rtb">Rtb</a> is maintained by <a href="https://github.com/mryap">mryap</a>.</span>
<h1>
<a id="data" class="anchor" href="#data" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Data</h1>

<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
</footer>
<p>Private Residential Tenancies Board (PRTB), Central Statistics Office (CSO), OECD data are extracted and concatenated together as a multi-variate dataset, with rental data as the predictable column.
<a href="http://dx.doi.org/10.7910/DVN/HRKFN2">http://dx.doi.org/10.7910/DVN/HRKFN2</a> </p>

<h1>
<a id="machine-learning-algorithms-deploy" class="anchor" href="#machine-learning-algorithms-deploy" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Machine Learning Algorithms Deploy</h1>

<ul>
<li>Feature engineering</li>
<li>Exploratory Analysis </li>
<li>Boosted Decision Tree Regression </li>
<li>Ordinary Least Squares Linear regression </li>
</ul>

<h1>
<a id="feature-selection" class="anchor" href="#feature-selection" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Feature Selection</h1>

<p>To construct effective features in the training data, 5 training datasets are constructed based on the same raw input data, but different additional features to each training set were added.</p>

<ul>
<li>Set A = Property Type + Location + Year + Rent features for the predicted rent</li>
<li>Set B = Property Type + Location + Year + CPI + Rent features for the predicted rent</li>
<li>Set C = Property Type + Location + Year + CPI + Price-Rent-Ratio + Rent features for the predicted rent </li>
<li>Set D = Property Type + Location + CPI + Price-Rent-Ratio + Vacancy Rates + Year + Rent features for the predicted rent </li>
<li>Set E = Property Type + Location + Year + CPI + Vacancy Rates + No. of Room + Rent features for the predicted rent</li>
</ul>

<h1>
<a id="measuring-model-performance" class="anchor" href="#measuring-model-performance" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Measuring Model Performance</h1>

<p align="center">
<img src="https://github.com/mryap/rtb/blob/master/media/CnE4iSpWAAAcG7v.jpg?raw=true">
</p>

<p>On a split training (70%) and test (30%) dataset, Boosted decision tree regression model is also the matching algorithm. </p>

</section>
<table>
<thead>
<tr>
<th>Split Data</th>
<th>Algorithm</th>
<th>RMSE</th>
<th>r2</th>
</tr>
</thead>
<tbody>
<tr>
<td>50/50</td>
<td>Boosted Decision Tree Regression</td>
<td>343.3298</td>
<td>0.487419</td>
</tr>
<tr>
<td>65/35</td>
<td>Boosted Decision Tree Regression</td>
<td>347.0633</td>
<td>0.473526</td>
</tr>
<tr>
<td>60/40</td>
<td>Boosted Decision Tree Regression</td>
<td>358.6932</td>
<td>0.452571</td>
</tr>
<tr>
<td>80/20</td>
<td>Boosted Decision Tree Regression</td>
<td>367.1906</td>
<td>0.411125</td>
</tr>
<tr>
<td>70/30</td>
<td>Boosted Decision Tree Regression</td>
<td>344.0009</td>
<td>0.497633</td>
</tr>
</tbody>
</table>


<p>Adding additional features like Number of Bedrooms to the data on the same training split – 70/30 produce the following outcome that Linear Regression is the best model in terms of performance</p>

<h1>
<a id="evaluating-the-importance-of-the-variables" class="anchor" href="#evaluating-the-importance-of-the-variables" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Evaluating the importance of the variables</h1>

<p>Kuhn’s R caret package is use to calculate variable importance. The varImp function together with lm object class produces the following outcome. </p>

<p align="center">
<img src="https://github.com/mryap/rtb/blob/master/media/Rplot.png?raw=true">
</p>

<p>In order of permutation importance scores, results from Azure ML analysis also produce a similar ranking results </p>

<table>
<thead>
<tr>
<th>Feature</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>PropertyType</td>
<td>201.2722</td>
</tr>
<tr>
<td>Location</td>
<td>180.1229</td>
</tr>
<tr>
<td>CPI</td>
<td>65.83267</td>
</tr>
<tr>
<td>Price.Rent.Ratio</td>
<td>65.11127</td>
</tr>
<tr>
<td>HousingStock</td>
<td>1.358679</td>
</tr>
<tr>
<td>VacancyRate</td>
<td>0.828779</td>
</tr>
<tr>
<td>NumberofBedrooms</td>
<td>0.005061</td>
</tr>
<tr>
<td>Year</td>
<td>-0.02083</td>
</tr>
</tbody>
</table>

<h1>
<a id="conclusion--future-works" class="anchor" href="#conclusion--future-works" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>CONCLUSION &amp; FUTURE WORKS</h1>

<p>AirBnB being cited as an influencing factor in the Irish rental market. For the next step, Dublin AirBnB data will be used to analyse the impact on the rental price movement. </p>

<p>According to Kieran and Gerard, house prices depend on how much individuals can borrow from financial institutions, with the amount borrowed can be a proxy of their disposable income and the current mortgage rate. Hence, the inclusion of income and interest rates offer the possibility of adding characteristics to the regression model for the next iteration of this project. </p>

<p>To further improve and enhance the predictions model to a more accurate level, this project is going to benefit from a domain expert knowledge on Ireland property market.</p>

<h1>
<a id="to-do" class="anchor" href="#to-do" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>TO DO</h1>

<ul>
<li>[ ] Calculate correlation<br>
</li>
<li>[ ] To remove attributes with an absolute correlation of 0.75 or higher.</li>
<li>[ ] Find out outliner</li>
<li>[ ] Deploy the model as a product </li>
</ul>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/mryap">mryap</a></p>
<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>

</body>
</html>
17 changes: 17 additions & 0 deletions javascripts/scale.fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}
document.addEventListener("gesturestart", gestureStart, false);
}
function gestureStart() {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
}
}
}
2 changes: 1 addition & 1 deletion params.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Rtb",
"tagline": "",
"body": "# Prediction Model for Dublin rental price movements\r\n\r\nExplores the use of data mining techniques to analyse the trend and understand the underlying influencing factors of Ireland property rental market. \r\n\r\nTransaction data from publicly available Private Residential Tenancies Board (PRTB) rent index from 2005 to 2015 were used and built prediction models using regression algorithms. \r\n",
"body": "# Prediction Model for Dublin rental price movements\r\n\r\nUsing Azure Machine Learning studio and R’s Caret package to explores the use of data mining techniques to analyse the trend and understand the underlying influencing factors of Ireland property rental market. \r\n\r\nTransaction data from publicly available Private Residential Tenancies Board (PRTB) rent index from 2005 to 2015 were used and built prediction models using regression algorithms. \r\n\r\n# Data\r\nPrivate Residential Tenancies Board (PRTB), Central Statistics Office (CSO), OECD data are extracted and concatenated together as a multi-variate dataset, with rental data as the predictable column. \r\nhttp://dx.doi.org/10.7910/DVN/HRKFN2 \r\n\r\n# Machine Learning Algorithms Deploy\r\n- Feature engineering\r\n- Exploratory Analysis \r\n- Boosted Decision Tree Regression \r\n- Ordinary Least Squares Linear regression \r\n\r\n# Feature Selection\r\nTo construct effective features in the training data, 5 training datasets are constructed based on the same raw input data, but different additional features to each training set were added.\r\n- Set A = Property Type + Location + Year + Rent features for the predicted rent\r\n- Set B = Property Type + Location + Year + CPI + Rent features for the predicted rent\r\n- Set C = Property Type + Location + Year + CPI + Price-Rent-Ratio + Rent features for the predicted rent \r\n- Set D = Property Type + Location + CPI + Price-Rent-Ratio + Vacancy Rates + Year + Rent features for the predicted rent \r\n- Set E = Property Type + Location + Year + CPI + Vacancy Rates + No. of Room + Rent features for the predicted rent\r\n\r\n# Measuring Model Performance\r\n<p align=\"center\">\r\n <img src=\"https://github.com/mryap/rtb/blob/master/media/CnE4iSpWAAAcG7v.jpg?raw=true\">\r\n</p>\r\n\r\nOn a split training (70%) and test (30%) dataset, Boosted decision tree regression model is also the matching algorithm. \r\n\r\n| Split Data | Algorithm | RMSE | r2 | \r\n|---|---|---|---|---|\r\n| 50/50 | Boosted Decision Tree Regression | 343.3298 | 0.487419 | \r\n| 65/35 | Boosted Decision Tree Regression | 347.0633 | 0.473526 | \r\n| 60/40 | Boosted Decision Tree Regression | 358.6932 | 0.452571 | \r\n| 80/20 | Boosted Decision Tree Regression | 367.1906 | 0.411125 | \r\n| 70/30 | Boosted Decision Tree Regression | 344.0009 | 0.497633 | \r\n\r\nAdding additional features like Number of Bedrooms to the data on the same training split – 70/30 produce the following outcome that Linear Regression is the best model in terms of performance\r\n\r\n\r\n# Evaluating the importance of the variables\r\nKuhn’s R caret package is use to calculate variable importance. The varImp function together with lm object class produces the following outcome. \r\n<p align=\"center\">\r\n <img src=\"https://github.com/mryap/rtb/blob/master/media/Rplot.png?raw=true\">\r\n</p>\r\n\r\nIn order of permutation importance scores, results from Azure ML analysis also produce a similar ranking results \r\n\r\n| Feature \t| Score \t|\r\n|---\t|---\t|\r\n| PropertyType \t| 201.2722\t|\r\n| Location\t| 180.1229\t|\r\n| CPI\t| 65.83267\t|\r\n| Price.Rent.Ratio\t| 65.11127 \t|\r\n| HousingStock\t| 1.358679 \t|\r\n| VacancyRate\t| 0.828779 \t|\r\n| NumberofBedrooms\t| 0.005061\t|\r\n| Year \t| -0.02083\t|\r\n\r\n# CONCLUSION & FUTURE WORKS\r\nAirBnB being cited as an influencing factor in the Irish rental market. For the next step, Dublin AirBnB data will be used to analyse the impact on the rental price movement. \r\n\r\nAccording to Kieran and Gerard, house prices depend on how much individuals can borrow from financial institutions, with the amount borrowed can be a proxy of their disposable income and the current mortgage rate. Hence, the inclusion of income and interest rates offer the possibility of adding characteristics to the regression model for the next iteration of this project. \r\n\r\nTo further improve and enhance the predictions model to a more accurate level, this project is going to benefit from a domain expert knowledge on Ireland property market.\r\n\r\n# TO DO\r\n\r\n- [ ] Calculate correlation \r\n- [ ] To remove attributes with an absolute correlation of 0.75 or higher.\r\n- [ ] Find out outliner\r\n- [ ] Deploy the model as a product \r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}
Loading

0 comments on commit a44113d

Please sign in to comment.