Description Usage Arguments Value Examples
The function is used to plot AUROC, AUPR, pAUROC and pAUPR curves.
1 2 3 4 |
table.methods |
a list of confusion tables of comparison for multiple networks to the same reference network. The tables are the outputs of |
plot.method |
a character string indicates to plot AUROC ("auroc"), AUPR ("aupr"), precision vs top weighted edges ("top.precision") or precision vs false positive rate ("fpr.precision") curves. |
roc.lim |
a vector to specify the plot limits, i.e. xmin, xmax, ymin and ymax of AUROC curves. |
pr.lim |
a vector to specify the plot limits, i.e. xmin, xmax, ymin and ymax of AUPR curves. |
top.precision.lim |
a vector to specify the plot limits, i.e. xmin, xmax, ymin and ymax of precision vs top weighted edges curves. |
fpr.precision.lim |
a vector to specify the plot limits, i.e. xmin, xmax, ymin and ymax of precision vs false positive rate curves. |
fill |
logical. If TRUE, the area under the curvers will be filled with colors. |
color |
a color string vectors to specify the colors for the curves. |
plot.ncol |
the number of columns of the layout of mutliple plots. |
... |
additional options for |
plotAUC
returns plots.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ##load librarys
library(RLowPC)
library(minet)
library(gridExtra)
library(ggplot2)
##get dream4 datasets
data(gnwdata)
data.exp<-gnwdata$size100$ts1[,-c(1:3)]
genes<-colnames(data.exp)
ref.edge<-gnwdata$size100$net1
ref.edge[,3]<-1
ref.adj<-edgelist2adjmatrix(ref.edge,genes)
##infer gene networks
inf.cor<-abs(cor(data.exp))
diag(inf.cor)<-0
inf.mi<-build.mim(data.exp)
inf.clr<-clr(inf.mi)
inf.mrnet<-mrnet(inf.mi)
##generate confusion tables
table.cor<-table.evaluate(inf.adj = inf.cor,ref.adj = ref.adj)
table.mi<-table.evaluate(inf.adj=inf.mi,ref.adj = ref.adj)
table.clr<-table.evaluate(inf.adj=inf.clr,ref.adj = ref.adj)
table.mrnet<-table.evaluate(inf.adj=inf.mrnet,ref.adj = ref.adj)
##put confusion tables into list, and set names as the methods
table.methods<-list(cor=table.cor,mi=table.mi,clr=table.clr,mrnet=table.mrnet)
plotAUC(table.methods,fill=T,lwd=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.