-
Notifications
You must be signed in to change notification settings - Fork 4
/
plot_simulations_all.R
111 lines (96 loc) · 2.4 KB
/
plot_simulations_all.R
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
suppressMessages({
source("utils/plot_methods_all.R")
library("tools")
library("data.table")
library("ggpubr")
library("scales")
})
file_path <- paste0(getwd(), "/results/results_csv/")
filename <- paste0(file_path, "simulation_results_blocks_100_allMethods_pred_final")
nb_relevant <- 20
N_CPU <- 100
list_func <- c(
"Marg",
"d0CRT",
"Permfit-DNN",
"CPI-DNN",
"CPI-RF",
"lazyvi",
"cpi_knockoff",
"loco",
# "LOCO-DNN",
"Strobl"
# "Shap",
# "SAGE",
# "MDI",
# "BART"
# "Knockoff_bart",
# "Knockoff_lasso",
# "Knockoff_deep",
)
run_plot_auc <- TRUE
run_plot_type1error <- TRUE
run_plot_power <- TRUE
run_time <- TRUE
run_plot_combine <- FALSE
run_all_methods <- FALSE
with_pval <- TRUE
filename_lbl_auc <- strsplit(filename, "_results_")[[1]][2]
filename_lbl <- strsplit(filename, "_results_")[[1]][2]
if (run_all_methods){
if (with_pval==TRUE){
filename_lbl_auc <- paste0(filename_lbl_auc, '_withPval')
}else{
filename_lbl_auc <- paste0(filename_lbl_auc, '_withoutPval')
}
}
if (run_plot_auc) {
plot_method(paste0(filename, ".csv"),
paste0("AUC_", filename_lbl_auc),
compute_auc,
nb_relevant = nb_relevant,
cor_coef = 0.8,
title = "AUC",
list_func = list_func,
mediane_bool = TRUE
)
}
if (run_plot_type1error) {
plot_method(paste0(filename, ".csv"),
paste0("type1error_", filename_lbl),
compute_pval,
nb_relevant = nb_relevant,
upper_bound = 0.05,
cor_coef = 0.8,
title = "Type I Error",
list_func = list_func
)
}
if (run_plot_power) {
plot_method(paste0(filename, ".csv"),
paste0("power_", filename_lbl),
compute_power,
nb_relevant = nb_relevant,
upper_bound = 0.05,
cor_coef = 0.8,
title = "Power",
list_func = list_func
)
}
if (run_time) {
plot_time(paste0(filename, ".csv"),
paste0("time_bars_", filename_lbl),
list_func = list_func,
N_CPU = N_CPU
)
}
if (run_plot_combine) {
plot_method(paste0(filename, ".csv"),
paste0("combine_", filename_lbl),
nb_relevant = nb_relevant,
cor_coef = 0.8,
title = "AUC",
list_func = list_func,
mediane_bool = TRUE
)
}