| plotPerf_multi {netDx} | R Documentation |
Plots a set of ROC/PR curves with average.
plotPerf_multi(inList, plotTitle = "performance", plotType = "ROC", xlab = "TPR", ylab = "FPR", meanCol = "darkblue", xlim = c(0, 1), ylim = c(0, 1))
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 |
Plots average curves with individual curves imposed.
No value. Side effect of plotting ROC and PR curves
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')