R/auc.R

Defines functions auc

Documented in auc

auc <-
function(rocout){
    TPRthr <- rocout[2,]
    FPRthr <- rocout[1,]
    FPRdif <- FPRthr - c(0, FPRthr[-length(FPRthr)])
    TPRinterpolated <- (TPRthr + c(0, TPRthr[-length(TPRthr)]))/2
    AUC <- TPRinterpolated %*% FPRdif
    return(AUC)
}
markvdwiel/GRridge documentation built on May 21, 2019, 12:25 p.m.