Tutorial: Credit Card Fraud Detection with SQL Server 2016 R Services

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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.

Fraud

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

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)