R/plotMeanROC.R

Defines functions plotMeanROC

Documented in plotMeanROC

plotMeanROC <- function(out){
  
  ROCstats <- out$ROCstats
  OMSpec <- rowMeans(unstack(ROCstats, form = OneMinusSpecificity ~ CVNumber))
  Sens <- rowMeans(unstack(ROCstats, form = Sensitivity ~ CVNumber))
  
  ## plotting with new colours
  plot(OMSpec, Sens, type = "l", lwd=3, col="orangered3", xlab="1 - specificity (FPR)", ylab="sensitivity (TPR)", axes=F, cex.lab=1.5)
  polygon(c(1,OMSpec), c(0,Sens), lwd=0.01, col="snow2")
  text(0.75, 0.1, col="orangered3", paste0("mean AUC = ",round(out$quality$ROC.AUC.MEAN, digits = 2)),cex = 1.5)
  axis(side=1, at=seq(0,1,0.1))
  axis(side=2, at=seq(0,1,0.1))
  
}
mategarb/R.ROSETTA documentation built on April 2, 2021, 12:28 a.m.