In this post we’ll create some simple functions to generate and chart a Receiver Operator (ROC) curve and visualize it using Plotly. See Carson’s plotly book for more details around changes in syntax. We’ll do this from a credit risk perspective i.e. validating a bank’s internal rating model (we’ll create a sample dataset keeping this in







![grim knight [a riddle]](https://xianblog.files.wordpress.com/2016/10/horsun-e1476260410583.jpg?w=333&h=390)






![importance sampling by kernel smoothing [experiment]](https://xianblog.files.wordpress.com/2016/09/lemonde9772.jpg?w=450)



