R/printAUC.R

Defines functions printAUC

#' @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)
}
shuangsong0110/EBPRS documentation built on Feb. 17, 2020, 6:14 p.m.