#' @import methods
printAUC <- function(S,testy){
#library(ROCR)
pred <- prediction(S, testy)
auc <- performance(pred,'auc')
auc=unlist(slot(auc,"y.values"))
if(auc<0.5){
pred <- prediction(S, -testy)
auc <- performance(pred,'auc')
auc=unlist(slot(auc,"y.values"))
}
return(auc)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.