Project Botticelli

Code and Data Samples (R, R Services, SSAS) Get Free Access Purchase this course

23 December 2016 · 3 comments · 1144 views

Classifier performance, mortgage default logistic regression, cross-sell and recommendations

Whilst testing classifier performance, it is helpful to compare a number of classification accuracy visualisations. You will find that there are many ways to do that in R, but SSAS Data Mining and Azure Machine Learning do not all support the same, broad set of diagnostic visualisations. You can easily run this simple R code to validate a classifier built in SSAS, Azure ML, or any another environment, by downloading it from:

It plots ROC, precision-recall, cost and lift curves, calculates optimum probability threshold, prints a confusion matrix, and additional metrics, for any two-class machine learning classifier. The only required inputs are a vector of known outcomes and a vector of predicted probabilities. As a bonus, this code will look up the optimum prediction probability threshold given a ratio of the cost of a False Positive to a False Negative.

To download additional code, used in Rafal’s Practical Data Science classroom courses, including a working SQL Server 2016 R Services mortgage analysis R script and the SQL Server 2016 .bak file containing the 10 million rows of data for this demo, as well as code showing how to write DMX for predicting recommendations using Association Rules algorithm in SSAS Data Mining, with and without buyer-level demographic details, scroll down (please note, this content is free of charge, but only available to registered members).

Log in or register for free to access this content.

Purchase This Course or Full Access Subscription

Single Course


Access this course for its lifetime*.
Subscription Best Value


Access all content on this site for 1 year.
Group Purchase

from $480/year

For small business & enterprise.
Group Purchase

  • Redeem a prepaid code
  • Payment is instant and you will receive a tax invoice straight away.
  • Your satisfaction is paramount: we offer a no-quibble refund guarantee.

* We guarantee each course to be available for at least 2 years from today, unless marked above with a date as a Course Retiring.


odeddror · 23 December 2016

Hi there,
There is no link to Mortgage database?
Oded Dror

Rafal Lukawiecki · 23 December 2016

Thanks for letting me know, Oded. The link has been fixed, it should work for you now. Bear in mind, you need to be logged in to see it: it is the 4th bullet point at the bottom of that article. If it is not showing, make sure to refresh the page, after you have logged in. Otherwise, give us a shout.

odeddror · 24 December 2016


Thank you

Oded Dror

Online Courses