If you have a database of credit-card transactions with a small percentage tagged as fraudulent, how can you create a process that automatically flags likely fraudulent transactions in the future? That's the premise behind the latest Data Science Deep Dive on MSDN. This tutorial provides a step by step to using the R language and the big-data statistical models of the RevoScaleR package of SQL Server 2016 R Services to build and use a predictive model to detect fraud.
To follow along with the tutorial you'll need to install SQL Server 2016 and R Services on a database server, and RStudio and Revolution R Enterprise on your local desktop or laptop. (Follow this guide to download and install the necessary prerequisites.)
Lesson 1 and Lesson 2 of the Deep Dive cover the fraud detection example, during which you will load simulated data into SQL Server, visualize the rates of fraud in the source data (shown below; higher numbers of transactions, especially international transactions, are indicative of fraud), create a linear model, and score that model on new transactions.
There's more in this Deep Dive beyond the fraud example; in later lessons you'll also learn how to: use R functions to transform data, how to switch between your local laptop and the remote database server for the computations; and how to simulate data using R. Follow the step by step guides (all R code is provided) to get started.
Microsoft Developer Network: Data Science Deep Dive: Using the RevoScaleR Packages