<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/retail-customer-analytics-with-sql-server-r-services/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2017/02/retail-applications-with-microsoft-r.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>In the hyper-competitive retail industry, intelligence about your customers is key. You need to be able to find the right customers, understand what types of customers you have, and know how to keep the best ones. Three solutions based around R and SQL Server R Services will help you do exactly that. </p>
<p>To find the right customers, you need to optimize your marketing activites. You might use different channels (phone, email, social media etc.) to try and reach potential customers, and some offers are likely to resonate more with certain prospects than others. Results from prior campaigns can be used to learn which channels and offers are the most effective, and to select the best offer using the best channel for future prospects. The <a target="_blank" rel="nofollow" href="https://gallery.cortanaintelligence.com/Solution/e992f8c1b29f4df897301d11796f9e7c">Marketing Campaign Optimization Solution</a> provides a template that uses SQL Server R Services to apply a predictive model to simulated data. After the one-click deploy process (which launches an Azure VM for you), you can adapt the template to use your own data to create an interactive PowerBI dashboard for campaign recommendations, as shown below. Read more about the solution <a target="_blank" rel="nofollow" href="https://blogs.technet.microsoft.com/machinelearning/2016/12/07/using-sql-server-2016-with-r-services-for-campaign-optimization/">in this blog post</a>.</p>
<p><a target="_blank" rel="nofollow" href="http://a1.typepad.com/6a0105360ba1c6970c01b7c8d362b1970b-pi"><img title="Campaign optimization" alt="Campaign optimization" src="http://a1.typepad.com/6a0105360ba1c6970c01b7c8d362b1970b-450wi"></a></p>
<p>To understand the kinds of customers you have, statistical clustering techniques are useful. The tutorial <a target="_blank" rel="nofollow" href="https://www.microsoft.com/en-us/sql-server/developer-get-started/rclustering">Customer Clustering with SQL Server R Services</a> provides a step-by-step guide to applying K-means clustering techniques in the R language to customer data. The provided sample data includes purchasing and return data for a retail store, which is then used to group the customers into inactive customers, cutomers making large purchases, and customers making a large number of returns. You can then use this clustering to classify new customers as they enter the system by deploying the model to SQL Server. All of the R code behind the analysis is <a target="_blank" rel="nofollow" href="https://github.com/Microsoft/sql-server-samples/tree/master/samples/features/r-services/getting-started/customer-clustering">available in Github</a>.</p>
<p><a target="_blank" rel="nofollow" href="https://www.microsoft.com/en-us/sql-server/developer-get-started/rclustering"><img title="Cluster_plot" alt="Cluster_plot" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c8d363cb970b-450wi"></a></p>
<p>Finally, to understand which customers are most loyal (and conversely, those that are about to no longer be customers), you need to understand customer churn. The tutorial <a target="_blank" rel="nofollow" href="https://gallery.cortanaintelligence.com/Tutorial/Customer-Churn-Prediction-Template-with-SQL-Server-R-Services-1">Customer Churn Prediction Template with SQL Server R Services</a> demonstrates how to develop and deploy a model to predict which customers are likely to churn (switch to a competitor) using SQL Server and R. This template includes sample data on customer demographics and their recent transactions, while a generalized linear model is used to predict those customers most likely to churn. The R code behind this analysis is also <a target="_blank" rel="nofollow" href="https://github.com/Microsoft/SQL-Server-R-Services-Samples/tree/master/Churn">available on GitHub</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/02/retail-applications-with-microsoft-r.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 title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/hBLqy2wgkHo"></a></div>