1
1
# !/usr/bin/Rscript
2
2
library(ggplot2 )
3
3
library(dplyr )
4
+ library(Cairo )
4
5
5
6
gdat = readRDS(' PrecRecF1/dat_precrecf1_glinternet' ) %> %
6
7
filter(test == " yes" ) %> %
@@ -20,32 +21,47 @@ ldat_large_adcaltrue = readRDS('PrecRecF1/dat_precrecf1_lasso') %>%
20
21
ldat_large_limit_nb = readRDS(' PrecRecF1/dat_precrecf1_lasso' ) %> %
21
22
filter(n == 10000 ) %> % filter(adcal == FALSE ) %> % filter(nbeta_limit == 2000 ) %> % filter(test == " yes" ) %> %
22
23
mutate(time_taken = time_taken + ols_time ) %> %
23
- mutate(function_used = " Limited beta lasso" )
24
+ mutate(function_used = " Limited- \U 03B2 lasso" )
24
25
25
26
vsglint_dat = bind_rows(ldat_large_limit_nb , gdat )
26
27
adcal_dat = bind_rows(ldat_small_adcalfalse , ldat_small_adcaltrue )
27
28
large_adcal_limit_nb_dat = bind_rows(ldat_large_adcaltrue , ldat_large_limit_nb )
28
29
29
- vsglint_precision_plot = ggplot(vsglint_dat , aes(x = function _used , y = precision )) + geom_boxplot() + theme_bw()
30
- vsglint_recall_plot = ggplot(vsglint_dat , aes(x = function _used , y = recall )) + geom_boxplot() + theme_bw()
31
- vsglint_time_taken_plot = ggplot(vsglint_dat , aes(x = function _used , y = time_taken )) + scale_y_continuous(trans = ' log10' ) + geom_boxplot() + theme_bw()
30
+ vsglint_precision_plot = ggplot(vsglint_dat , aes(x = function _used , y = precision )) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Precision" )
31
+ vsglint_recall_plot = ggplot(vsglint_dat , aes(x = function _used , y = recall )) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Recall" )
32
32
33
- ggsave(vsglint_precision_plot , file = " plots/vsglint_precision_plot.pdf" , width = 2.5 , height = 3 )
34
- ggsave(vsglint_recall_plot , file = " plots/vsglint_recall_plot.pdf" , width = 2.5 , height = 3 )
35
- ggsave(vsglint_time_taken_plot , file = " plots/vsglint_time_plot.pdf" , width = 2.5 , height = 3 )
36
33
37
- adcal_precision_plot = ggplot(adcal_dat , aes(x = function _used , y = precision )) + geom_boxplot() + theme_bw()
38
- adcal_recall_plot = ggplot(adcal_dat , aes(x = function _used , y = recall )) + geom_boxplot() + theme_bw()
39
- adcal_time_taken_plot = ggplot(adcal_dat , aes(x = function _used , y = time_taken )) + scale_y_continuous(trans = ' log10' ) + geom_boxplot() + theme_bw()
34
+ vsglint_time_taken_plot = ggplot(vsglint_dat , aes(x = function _used , y = time_taken )) + scale_y_continuous(trans = ' log10' ) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Time Taken (s)" )
40
35
41
- ggsave(adcal_precision_plot , file = " plots/small_adcal_precision_plot.pdf" , width = 3 , height = 4 )
42
- ggsave(adcal_recall_plot , file = " plots/small_adcal_recall_plot.pdf" , width = 3 , height = 4 )
43
- ggsave(adcal_time_taken_plot , file = " plots/small_adcal_time_plot.pdf" , width = 3 , height = 4 )
44
36
45
- large_adcal_limit_nb_precision_plot = ggplot(large_adcal_limit_nb_dat , aes(x = function _used , y = precision )) + geom_boxplot() + theme_bw()
46
- large_adcal_limit_nb_recall_plot = ggplot(large_adcal_limit_nb_dat , aes(x = function _used , y = recall )) + geom_boxplot() + theme_bw()
47
- large_adcal_limit_nb_time_taken_plot = ggplot(large_adcal_limit_nb_dat , aes(x = function _used , y = time_taken )) + scale_y_continuous(trans = ' log10' ) + geom_boxplot() + theme_bw()
48
37
49
- ggsave(large_adcal_limit_nb_precision_plot , file = " plots/large_adcal_limit_nb_precision_plot.pdf" , width = 3 , height = 4 )
50
- ggsave(large_adcal_limit_nb_recall_plot , file = " plots/large_adcal_limit_nb_recall_plot.pdf" , width = 3 , height = 4 )
51
- ggsave(large_adcal_limit_nb_time_taken_plot , file = " plots/large_adcal_limit_nb_time_plot.pdf" , width = 3 , height = 4 )
38
+ ggsave(vsglint_precision_plot , file = " plots/vsglint_precision_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
39
+ ggsave(vsglint_recall_plot , file = " plots/vsglint_recall_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
40
+ ggsave(vsglint_time_taken_plot , file = " plots/vsglint_time_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
41
+
42
+ adcal_precision_plot = ggplot(adcal_dat , aes(x = function _used , y = precision )) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Precision" )
43
+
44
+
45
+ adcal_recall_plot = ggplot(adcal_dat , aes(x = function _used , y = recall )) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Recall" )
46
+
47
+
48
+ adcal_time_taken_plot = ggplot(adcal_dat , aes(x = function _used , y = time_taken )) + scale_y_continuous(trans = ' log10' ) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Time Taken (s)" )
49
+
50
+
51
+ ggsave(adcal_precision_plot , file = " plots/small_adcal_precision_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
52
+ ggsave(adcal_recall_plot , file = " plots/small_adcal_recall_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
53
+ ggsave(adcal_time_taken_plot , file = " plots/small_adcal_time_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
54
+
55
+ large_adcal_limit_nb_precision_plot = ggplot(large_adcal_limit_nb_dat , aes(x = function _used , y = precision )) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Precision" )
56
+
57
+
58
+ large_adcal_limit_nb_recall_plot = ggplot(large_adcal_limit_nb_dat , aes(x = function _used , y = recall )) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Recall" )
59
+
60
+
61
+ large_adcal_limit_nb_time_taken_plot = ggplot(large_adcal_limit_nb_dat , aes(x = function _used , y = time_taken )) + scale_y_continuous(trans = ' log10' ) + geom_boxplot() + theme_bw() + theme(axis.title.x = element_blank()) + labs(y = " Time Taken (s)" )
62
+
63
+
64
+
65
+ ggsave(large_adcal_limit_nb_precision_plot , file = " plots/large_adcal_limit_nb_precision_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
66
+ ggsave(large_adcal_limit_nb_recall_plot , file = " plots/large_adcal_limit_nb_recall_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
67
+ ggsave(large_adcal_limit_nb_time_taken_plot , file = " plots/large_adcal_limit_nb_time_plot.pdf" , width = 2.6 , height = 3 , device = cairo_pdf )
0 commit comments