R/roc_curve.R

#' Plot Receiver Operating Curves
#'

"roc_curve" <-
  function(out, truth) {
    
    pred<-prediction(out[,3],truth[,3])
    curve<-performance(pred,"tpr","fpr")
    plot(curve,main="ROC Curve",xlab="False Positive Rate",ylab="True Positive Rate",lwd=3)
    
    out<-performance(pred,"auc")@y.values[[1]]
    return(out)
  }

Try the iRafNet package in your browser

Any scripts or data that you put into this service are public.

iRafNet documentation built on May 2, 2019, 6:56 a.m.