Skip to content

Instantly share code, notes, and snippets.

@Puriney
Created August 13, 2013 03:14
Show Gist options
  • Save Puriney/6217589 to your computer and use it in GitHub Desktop.
Save Puriney/6217589 to your computer and use it in GitHub Desktop.
R: ROC
require(pROC)
set.seed(1026)
obs<-rep(0:1, each=50)
pred<-c(runif(50,min=0,max=0.8),runif(50,min=0.3,max=0.6))
plot(roc(obs,pred),print.auc=TRUE, auc.polygon=TRUE,max.auc.polygon=TRUE,auc.polygon.col="#DEEBE8",grid=c(0.1,0.2),grid.col=c("blue","red"),print.thres=TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment