plotPerf_multi {netDx}R Documentation

Plots a set of ROC/PR curves with average.

Description

Plots a set of ROC/PR curves with average.

Usage

plotPerf_multi(inList, plotTitle = "performance", plotType = "ROC",
  xlab = "TPR", ylab = "FPR", meanCol = "darkblue", xlim = c(0, 1),
  ylim = c(0, 1))

Arguments

inList

(list) ROCR::performance objects, one per iteration

plotTitle

(numeric) plot title

plotType

(char) one of ROC | PR | custom. Affects x/y labels

xlab

(char) x-axis label

ylab

(char) y-axis label

meanCol

(char) colour for mean trendline

xlim

(numeric) min/max extent for x-axis

ylim

(numeric) min/max extent for y-axis

Details

Plots average curves with individual curves imposed.

Value

No value. Side effect of plotting ROC and PR curves

Examples

inDir <- system.file("extdata","example_output",package="netDx")
all_rng <- list.files(path = inDir, pattern = 'rng.')
fList <- paste(inDir,all_rng,'predictionResults.txt',sep=getFileSep())
rocList <- list()
for (k in seq_len(length(fList))) {
  dat <- read.delim(fList[1],sep='\t',header=TRUE,as.is=TRUE)
  predClasses <- c('LumA', 'notLumA')
  pred_col1 <- sprintf('%s_SCORE',predClasses[1])
  pred_col2 <- sprintf('%s_SCORE',predClasses[2])
  idx1 <- which(colnames(dat) == pred_col1)
  idx2 <- which(colnames(dat) == pred_col2)
 pred <- ROCR::prediction(dat[,idx1]-dat[,idx2], 
		dat$STATUS==predClasses[1])
 rocList[[k]] <- ROCR::performance(pred,'tpr','fpr')
}
plotPerf_multi(rocList,'ROC')

[Package netDx version 1.0.3 Index]