plotPerf: Plots various measures of predictor performance for binary...

Description Usage Arguments Details Value Examples

View source: R/plotPerf.R

Description

Plots various measures of predictor performance for binary classifiers

Usage

1
plotPerf(resList = NULL, inFiles, predClasses, plotSEM = FALSE)

Arguments

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.

plotSEM

(logical) metric for error bars. If set to TRUE, plots SEM; else plots SD.

Details

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)

Value

(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 or (mean+/-SD) AUROC 2) mean+/-SEM or (mean+/-SD) AUPR 3) ROC curve for all runs plus average 4) PR curve for all runs plus average

Examples

1
2
3
4
5
6
7
8
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'))

BaderLab/netDx documentation built on Sept. 26, 2021, 9:13 a.m.