<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/demo-real-time-predictions-with-microsoft-r-server/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2017/06/real-time-predictions.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>At the R/Finance conference last month, I demonstrated how to operationalize models developed in Microsoft R Server as web services using the <a rel="nofollow" href="https://msdn.microsoft.com/en-us/microsoft-r/mrsdeploy/mrsdeploy" target="_blank">mrsdeploy package</a>. Then, I used that deployed model to generate predictions for loan delinquency, using a Python script as the client. (You can see <a rel="nofollow" href="https://www.slideshare.net/RevolutionAnalytics/predicting-loan-delinquency-at-one-million-transactions-per-second" target="_blank">slides here</a>, and a <a rel="nofollow" href="https://channel9.msdn.com/Events/RFinance/RFinance-2017/Detecting-Fraud-at-1-Million-Transactions-per-Second" target="_blank">video of the presentation</a> below.)</p>
<p>With Microsoft R Server 9.1, there are now two ways to operationalize models as a <a rel="nofollow" href="https://msdn.microsoft.com/en-us/microsoft-r/operationalize/about" target="_blank">Web service</a> or as a <a rel="nofollow" href="https://msdn.microsoft.com/en-us/microsoft-r/scaler/packagehelp/rxrealtimescoring" target="_blank">SQL Server stored procedure</a>:</p>
<ul>
<li><strong>Flexible Operationalization</strong>: Deploy any R script or function.</li>
<li><strong>Real-Time Operationalization</strong>: Deploy model objects generated by <a rel="nofollow" href="https://msdn.microsoft.com/en-us/microsoft-r/scaler/packagehelp/rxrealtimescoring" target="_blank">specific functions</a> in Microsoft R, but generates predictions much more quickly by bypassing the R interpreter.</li>
</ul>
<p>In the demo, which begins at the 10:00 mark in the video below, you can see a comparison of using the two types of deployment. Ultimately, I was able to generate predictions from a <a rel="nofollow" href="https://msdn.microsoft.com/en-us/microsoft-r/scaler/packagehelp/rxdforest" target="_blank">random forest</a> at a rate of 1M predictions per second, with three Python clients simultaneously drawing responses from the server (an Azure <a rel="nofollow" href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-sizes-memory" target="_blank">GS5 instance</a> running the <a rel="nofollow" href="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoft-ads.standard-data-science-vm" target="_blank">Windows Data Science VM</a>).</p>
<p><iframe width="450" allowfullscreen="" src="https://channel9.msdn.com/Events/RFinance/RFinance-2017/Detecting-Fraud-at-1-Million-Transactions-per-Second/player" height="288"></iframe></p>
<p>If you'd like to try out this capability yourself, you can find the R and Python scripts used in the demo <a rel="nofollow" href="https://github.com/revodavid/rfinance-realtime" target="_blank">at this Github repository</a>. The <a rel="nofollow" href="https://www.lendingclub.com/info/download-data.action" target="_blank">lending club data is available here</a>, and the <a rel="nofollow" href="https://blogs.msdn.microsoft.com/microsoftrservertigerteam/2016/09/27/loan-classification-using-sql-server-2016-r-services/" target="_blank">script used to featurize the data is here</a>. </p>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.revolutionanalytics.com/2017/06/real-time-predictions.html"> Revolutions</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/qIyi6AreBYw" height="1"></a></div>