plotPerf {netDx} | R Documentation |
Plots various measures of predictor performance for binary classifiers
plotPerf(resList = NULL, inFiles, predClasses)
resList |
(list) list of prediction results. If provided, the method will ignore inDir |
inFiles |
(char) path to predictionResults.txt files. A vector, each with absolute paths to predictionResults.txt |
predClasses |
(char) vector of class names. |
Plots individual and average ROC/PR curves. mean+/-SEM performance for a predictor run using nested cross-validation or a similar repeated design. predictionResults.txt contains a (data.frame)
(list) each key corresponds to an input file in inDir. Value is a list with: 1) stats: 'stats' component of perfCalc 2) rocCurve: ROCR performance object for ROC curve 3) prCurve: ROCR performance object for PR curve 4) auroc: Area under ROC curve 5) aupr: Area under PR curve 6) accuracy: Accuracy
Side effect of plotting in a 2x2 format: 1) mean+/-SEM AUROC 2) mean+/-SEM AUPR 3) ROC curve for all runs plus average 4) PR curve for all runs plus average
inDir <- system.file("extdata","example_output",package='netDx') inFiles <- paste(rep(inDir,3), sprintf("rng%i",seq_len(3)),"predictionResults.txt", sep=getFileSep()) resList <- list() for (k in seq_len(length(inFiles))) { resList[[k]] <- read.delim(inFiles[k],sep="\t",header=TRUE,as.is=TRUE) } plotPerf(resList, predClasses = c('LumA','notLumA'))