Here is an explanation of the different objects:
GSA: gres
LAT: lacres
LTT: lactopres
LAW: nlacres
LAM: lacmres
LRM: lrmres
ALT: alcres
ALW: nalcres
ALM: almres
suppressPackageStartupMessages({
library("kableExtra")
})
F1 <- function(x,y) {
( 2 * x * y ) / ( x + y )
}
PRECREC <- function(x){
y <- aggregate(.~groupsize+delta,x,mean)
y$PREC <- y$TP / ( y$TP + y$FP )
y$REC <- y$TP / ( y$TP + y$FN )
y$F1 <- F1(y$PREC,y$REC)
y
}
# usage: lapply(x20,PRECREC)
smrz <- function(x) {
P <- mean(x$PREC)
R <- mean(x$REC)
F <- F1(P,R)
c(P,R,F)
}
# usage: smrz(x20a)
load("GSE158422_simulate020_rslurm.Rdata")
x20 <- list("GSA"=gres,"LAT"=latres,"LTT"=lttres,"LAW"=lawres,
"LAM"=lamres,"LRM"=lrmres,"ALT"=altres,"ALW"=alwres,"ALM"=almres)
load("GSE158422_simulate050_rslurm.Rdata")
x50 <- list("GSA"=gres,"LAT"=latres,"LTT"=lttres,"LAW"=lawres,
"LAM"=lamres,"LRM"=lrmres,"ALT"=altres,"ALW"=alwres,"ALM"=almres)
load("GSE158422_simulate100_rslurm.Rdata")
x100 <- list("GSA"=gres,"LAT"=latres,"LTT"=lttres,"LAW"=lawres,
"LAM"=lamres,"LRM"=lrmres,"ALT"=altres,"ALW"=alwres,"ALM"=almres)
rm(myann)
rm(gp2)
rm(normal_mval)
rm(mval,anno)
Merge the data at gene set sizes of 20, 50 and 100 into a single result.
all <- lapply(1:length(x20),function(i) {
mg <- rbind(x20[[i]],x50[[i]],x100[[i]])
m <- apply(mg,2,mean)
P <- m["TP"] / ( m["TP"] + m["FP"])
R <- m["TP"] / ( m["TP"] + m["FN"] )
F <- F1(P,R)
res <- c(P,R,F)
names(res) <- c("P","R","F")
return(res)
} )
names(all) <- names(x20)
all <- do.call(rbind,all)
colnames(all) <- c("PREC","REC","F1")
all %>% kbl(caption="Overall simulation results") %>% kable_paper("hover", full_width = F)
PREC | REC | F1 | |
---|---|---|---|
GSA | 0.8483152 | 0.1525667 | 0.2586212 |
LAT | 0.8826072 | 0.1578867 | 0.2678572 |
LTT | 0.8501947 | 0.1775433 | 0.2937449 |
LAW | 0.8515092 | 0.1975700 | 0.3207244 |
LAM | 0.9385810 | 0.2203100 | 0.3568563 |
LRM | 0.9377231 | 0.1383767 | 0.2411654 |
ALT | 0.8755087 | 0.1728167 | 0.2886556 |
ALW | 0.8547240 | 0.1926633 | 0.3144471 |
ALM | 0.9376004 | 0.2139167 | 0.3483550 |
par(mar = c(5.1, 4.1, 5.1, 2.1))
cols <- c("white","gray","black")
barplot(t(all),beside=TRUE,ylim=c(0,1),ylab="index",
col=cols, cex.names=0.7, cex.axis=0.7, main="Overall simulation results")
grid()
legend("right", inset=.01, c("Precision","Recall","F1"), fill=cols, cex=0.7)
Make a set of three barplots which summarise method performance over the range of group size and delta values, for gene set sizes of 20, 50 and 200.
groupsizes=unique(x20[[1]]$groupsize)
deltas=unique(x20[[1]]$delta)
x20a <- lapply(x20,PRECREC)
x20aa <- lapply(x20a,smrz)
x20aa <- do.call(rbind,x20aa)
colnames(x20aa) <- c("PREC","REC","F1")
x50a <- lapply(x50,PRECREC)
x50aa <- lapply(x50a,smrz)
x50aa <- do.call(rbind,x50aa)
colnames(x50aa) <- c("PREC","REC","F1")
x100a <- lapply(x100,PRECREC)
x100aa <- lapply(x100a,smrz)
x100aa <- do.call(rbind,x100aa)
colnames(x100aa) <- c("PREC","REC","F1")
x20aa %>% kbl(caption="sim 20 res") %>% kable_paper("hover", full_width = F)
PREC | REC | F1 | |
---|---|---|---|
GSA | 0.8700710 | 0.0981032 | 0.1763252 |
LAT | 0.5936310 | 0.0139226 | 0.0272071 |
LTT | 0.2489647 | 0.0207438 | 0.0382968 |
LAW | 0.8418063 | 0.0401506 | 0.0766455 |
LAM | 0.8470064 | 0.0407538 | 0.0777659 |
LRM | 0.7558397 | 0.0253784 | 0.0491080 |
ALT | 0.5956716 | 0.0146893 | 0.0286715 |
ALW | 0.7807928 | 0.0349123 | 0.0668361 |
ALM | 0.7854717 | 0.0353183 | 0.0675971 |
x50aa %>% kbl(caption="sim 50 res") %>% kable_paper("hover", full_width = F)
PREC | REC | F1 | |
---|---|---|---|
GSA | 0.7327463 | 0.1881165 | 0.2993751 |
LAT | 0.8143274 | 0.1169633 | 0.2045471 |
LTT | 0.6786822 | 0.1573165 | 0.2554260 |
LAW | 0.8186915 | 0.1789645 | 0.2937220 |
LAM | 0.8910059 | 0.1906303 | 0.3140662 |
LRM | 0.8885408 | 0.0961925 | 0.1735921 |
ALT | 0.8098098 | 0.1289673 | 0.2225000 |
ALW | 0.8061609 | 0.1740677 | 0.2863140 |
ALM | 0.8722406 | 0.1843159 | 0.3043242 |
x100aa %>% kbl(caption="sim 100 res") %>% kable_paper("hover", full_width = F)
PREC | REC | F1 | |
---|---|---|---|
GSA | 0.6239676 | 0.2313303 | 0.3375259 |
LAT | 0.7685017 | 0.3755815 | 0.5045700 |
LTT | 0.7872853 | 0.3729178 | 0.5061057 |
LAW | 0.7491603 | 0.4077488 | 0.5280782 |
LAM | 0.9078306 | 0.4668469 | 0.6166070 |
LRM | 0.9078575 | 0.3322275 | 0.4864428 |
ALT | 0.7641259 | 0.4053134 | 0.5296735 |
ALW | 0.7611033 | 0.3989458 | 0.5234933 |
ALM | 0.9052185 | 0.4545140 | 0.6051698 |
barplot(t(x20aa),beside=TRUE,ylim=c(0,1),ylab="index",
col=cols, cex.names=0.8, cex.axis=0.8, main="20 genes per set")
abline(h=seq(0.2,1,0.2),lty=2,col="gray")
legend("right", inset=.01, c("Precision","Recall","F1"), fill=cols, bg="white", cex=0.8)
barplot(t(x50aa),beside=TRUE,ylim=c(0,1),ylab="index",
col=cols, cex.names=0.8, cex.axis=0.8, main="50 genes per set")
abline(h=seq(0.2,1,0.2),lty=2,col="gray")
legend("right", inset=.01, c("Precision","Recall","F1"), fill=cols, bg="white", cex=0.8)
barplot(t(x100aa),beside=TRUE,ylim=c(0,1),ylab="index",
col=cols, cex.names=0.8, cex.axis=0.8, main="100 genes per set")
abline(h=seq(0.2,1,0.2),lty=2,col="gray")
legend("bottomright", inset=.01, c("Precision","Recall","F1"), fill=cols, bg="white", cex=0.8)
dev.off()
## null device
## 1
pdf("fig1_slurm.pdf",height=6,width=7)
par(mfrow=c(2,2))
par(mar = c(2.5, 4, 3, 1))
barplot(t(all),beside=TRUE,ylim=c(0,1),ylab="index",
col=cols, cex.names=0.65, cex.axis=0.8, main="Overall simulation results")
abline(h=seq(0.2,1,0.2),lty=2,col="gray")
legend("right", inset=0, c("Precision","Recall","F1"), fill=cols, bg="white", cex=0.8)
mtext("A", 2, adj=2.5, las=1,padj=-4,cex=2)
barplot(t(x20aa),beside=TRUE,ylim=c(0,1),ylab="index",
col=cols, cex.names=0.65, cex.axis=0.8, main="20 genes per set")
abline(h=seq(0.2,1,0.2),lty=2,col="gray")
legend("right", inset=0, c("Precision","Recall","F1"), fill=cols, bg="white", cex=0.8)
mtext("B", 2, adj=2.5, las=1,padj=-4,cex=2)
barplot(t(x50aa),beside=TRUE,ylim=c(0,1),ylab="index",
col=cols, cex.names=0.65, cex.axis=0.8, main="50 genes per set")
abline(h=seq(0.2,1,0.2),lty=2,col="gray")
legend("right", inset=0, c("Precision","Recall","F1"), fill=cols, bg="white", cex=0.8)
mtext("C", 2, adj=2.5, las=1,padj=-4,cex=2)
barplot(t(x100aa),beside=TRUE,ylim=c(0,1),ylab="index",
col=cols, cex.names=0.65, cex.axis=0.8, main="100 genes per set")
abline(h=seq(0.2,1,0.2),lty=2,col="gray")
legend("bottomright", inset=0, c("Precision","Recall","F1"), fill=cols, bg="white", cex=0.8)
mtext("D", 2, adj=2.5, las=1,padj=-4,cex=2)
dev.off()
## pdf
## 2
As GSA appears to be the best-performing existing method for enrichment analysis, it is a good idea to compare it to LAM which is the best one out of the new methods evaluated here. The following charts show the performance of GSA and LAM including precision and recall over the range of group sizes and delta values when the sets contain 20, 50 and 100 genes each.
First with 20 genes per set.
par(mfrow=c(2,3))
par(mar = c(4.1, 4.1, 3.5, 0.9))
gsa <- lapply(deltas,function(d) { subset(x20a$GSA,delta==d) } )
lam <- lapply(deltas,function(d) { subset(x20a$LAM,delta==d) } )
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"PREC"],type="b",las=1,ylab="precision",xlab="",
main="",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"PREC"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"PREC"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"PREC"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"PREC"] ,type="b",col="darkorange")
grid()
legend("bottomright", legend=c("0.5", "0.4", "0.3", "0.2", "0.1"),title="delta",
lty=1, lwd=2, col=c("black", "red", "blue", "darkgreen", "darkorange"), cex=1, bg="white")
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"REC"],type="b",las=1,ylab="recall",xlab="group size",
main="GSA",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"REC"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"REC"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"REC"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"REC"] ,type="b",col="darkorange")
grid()
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"F1"],type="b",las=1,ylab="F1",xlab="",
main="",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"F1"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"F1"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"F1"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"F1"] ,type="b",col="darkorange")
grid()
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"PREC"],type="b",las=1,ylab="precision",xlab="",
main="",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"PREC"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"PREC"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"PREC"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"PREC"] ,type="b",col="darkorange")
grid()
legend("bottomright", legend=c("0.5", "0.4", "0.3", "0.2", "0.1"),title="delta",
lty=1, lwd=2, col=c("black", "red", "blue", "darkgreen", "darkorange"), cex=1, bg="white")
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"REC"],type="b",las=1,ylab="recall",xlab="group size",
main="LAM",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"REC"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"REC"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"REC"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"REC"] ,type="b",col="darkorange")
grid()
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"F1"],type="b",las=1,ylab="F1",xlab="",
main="",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"F1"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"F1"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"F1"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"F1"] ,type="b",col="darkorange")
grid()
Now with 50 genes per set.
par(mfrow=c(2,3))
par(mar = c(4.1, 4.1, 3.5, 0.9))
gsa <- lapply(deltas,function(d) { subset(x50a$GSA,delta==d) } )
lam <- lapply(deltas,function(d) { subset(x50a$LAM,delta==d) } )
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"PREC"],type="b",las=1,ylab="precision",xlab="",
main="",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"PREC"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"PREC"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"PREC"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"PREC"] ,type="b",col="darkorange")
grid()
legend("bottomright", legend=c("0.5", "0.4", "0.3", "0.2", "0.1"),title="delta",
lty=1, lwd=2, col=c("black", "red", "blue", "darkgreen", "darkorange"), cex=1, bg="white")
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"REC"],type="b",las=1,ylab="recall",xlab="group size",
main="GSA",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"REC"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"REC"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"REC"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"REC"] ,type="b",col="darkorange")
grid()
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"F1"],type="b",las=1,ylab="F1",xlab="",
main="",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"F1"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"F1"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"F1"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"F1"] ,type="b",col="darkorange")
grid()
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"PREC"],type="b",las=1,ylab="precision",xlab="",
main="",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"PREC"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"PREC"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"PREC"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"PREC"] ,type="b",col="darkorange")
grid()
legend("bottomright", legend=c("0.5", "0.4", "0.3", "0.2", "0.1"),title="delta",
lty=1, lwd=2, col=c("black", "red", "blue", "darkgreen", "darkorange"), cex=1, bg="white")
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"REC"],type="b",las=1,ylab="recall",xlab="group size",
main="LAM",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"REC"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"REC"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"REC"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"REC"] ,type="b",col="darkorange")
grid()
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"F1"],type="b",las=1,ylab="F1",xlab="",
main="",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"F1"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"F1"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"F1"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"F1"] ,type="b",col="darkorange")
grid()
Now 100 genes per set
par(mfrow=c(2,3))
par(mar = c(4.1, 4.1, 3.5, 0.9))
gsa <- lapply(deltas,function(d) { subset(x100a$GSA,delta==d) } )
lam <- lapply(deltas,function(d) { subset(x100a$LAM,delta==d) } )
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"PREC"],type="b",las=1,ylab="precision",xlab="",
main="",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"PREC"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"PREC"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"PREC"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"PREC"] ,type="b",col="darkorange")
grid()
legend("bottomright", legend=c("0.5", "0.4", "0.3", "0.2", "0.1"),title="delta",
lty=1, lwd=2, col=c("black", "red", "blue", "darkgreen", "darkorange"), cex=1, bg="white")
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"REC"],type="b",las=1,ylab="recall",xlab="group size",
main="GSA",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"REC"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"REC"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"REC"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"REC"] ,type="b",col="darkorange")
grid()
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"F1"],type="b",las=1,ylab="F1",xlab="",
main="",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"F1"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"F1"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"F1"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"F1"] ,type="b",col="darkorange")
grid()
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"PREC"],type="b",las=1,ylab="precision",xlab="",
main="",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"PREC"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"PREC"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"PREC"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"PREC"] ,type="b",col="darkorange")
grid()
legend("bottomright", legend=c("0.5", "0.4", "0.3", "0.2", "0.1"),title="delta",
lty=1, lwd=2, col=c("black", "red", "blue", "darkgreen", "darkorange"), cex=1, bg="white")
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"REC"],type="b",las=1,ylab="recall",xlab="group size",
main="LAM",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"REC"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"REC"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"REC"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"REC"] ,type="b",col="darkorange")
grid()
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"F1"],type="b",las=1,ylab="F1",xlab="",
main="",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"F1"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"F1"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"F1"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"F1"] ,type="b",col="darkorange")
grid()
## PDF output
pdf("fig2_slurm.pdf",height=6,width=7)
par(mfrow=c(2,3))
par(mar = c(4.1, 4.1, 3.5, 0.9))
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"PREC"],type="b",las=1,ylab="precision",xlab="",
main="",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"PREC"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"PREC"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"PREC"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"PREC"] ,type="b",col="darkorange")
grid()
legend("bottomright", legend=c("0.5", "0.4", "0.3", "0.2", "0.1"),title="delta",
lty=1, lwd=2, col=c("black", "red", "blue", "darkgreen", "darkorange"), cex=1, bg="white")
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"REC"],type="b",las=1,ylab="recall",xlab="group size",
main="GSA",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"REC"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"REC"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"REC"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"REC"] ,type="b",col="darkorange")
grid()
plot(gsa[[length(gsa)]][,"groupsize"], gsa[[length(gsa)]][,"F1"],type="b",las=1,ylab="F1",xlab="",
main="",ylim=c(0,1))
lines(gsa[[length(gsa)-1]][,"groupsize"], gsa[[length(gsa)-1]][,"F1"] ,type="b",col="red")
lines(gsa[[length(gsa)-2]][,"groupsize"], gsa[[length(gsa)-2]][,"F1"] ,type="b",col="blue")
lines(gsa[[length(gsa)-3]][,"groupsize"], gsa[[length(gsa)-3]][,"F1"] ,type="b",col="darkgreen")
lines(gsa[[length(gsa)-4]][,"groupsize"], gsa[[length(gsa)-4]][,"F1"] ,type="b",col="darkorange")
grid()
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"PREC"],type="b",las=1,ylab="precision",xlab="",
main="",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"PREC"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"PREC"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"PREC"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"PREC"] ,type="b",col="darkorange")
grid()
legend("bottomright", legend=c("0.5", "0.4", "0.3", "0.2", "0.1"),title="delta",
lty=1, lwd=2, col=c("black", "red", "blue", "darkgreen", "darkorange"), cex=1, bg="white")
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"REC"],type="b",las=1,ylab="recall",xlab="group size",
main="LAM",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"REC"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"REC"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"REC"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"REC"] ,type="b",col="darkorange")
grid()
plot(lam[[length(lam)]][,"groupsize"], lam[[length(lam)]][,"F1"],type="b",las=1,ylab="F1",xlab="",
main="",ylim=c(0,1))
lines(lam[[length(lam)-1]][,"groupsize"], lam[[length(lam)-1]][,"F1"] ,type="b",col="red")
lines(lam[[length(lam)-2]][,"groupsize"], lam[[length(lam)-2]][,"F1"] ,type="b",col="blue")
lines(lam[[length(lam)-3]][,"groupsize"], lam[[length(lam)-3]][,"F1"] ,type="b",col="darkgreen")
lines(lam[[length(lam)-4]][,"groupsize"], lam[[length(lam)-4]][,"F1"] ,type="b",col="darkorange")
grid()
dev.off()
## png
## 2
sessionInfo()
## R version 4.3.2 (2023-10-31)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.3 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Australia/Melbourne
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] kableExtra_1.3.4
##
## loaded via a namespace (and not attached):
## [1] vctrs_0.6.5 svglite_2.1.3 httr_1.4.7 cli_3.6.2
## [5] knitr_1.45 rlang_1.1.2 xfun_0.41 highr_0.10
## [9] stringi_1.8.3 jsonlite_1.8.8 glue_1.6.2 colorspace_2.1-0
## [13] htmltools_0.5.7 sass_0.4.8 scales_1.3.0 rmarkdown_2.25
## [17] evaluate_0.23 munsell_0.5.0 jquerylib_0.1.4 fastmap_1.1.1
## [21] yaml_2.3.8 lifecycle_1.0.4 stringr_1.5.1 compiler_4.3.2
## [25] rvest_1.0.3 rstudioapi_0.15.0 systemfonts_1.0.5 digest_0.6.33
## [29] viridisLite_0.4.2 R6_2.5.1 magrittr_2.0.3 webshot_0.5.5
## [33] bslib_0.6.1 tools_4.3.2 xml2_1.3.6 cachem_1.0.8