1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/env Rscript
load (sprintf ("%s/data/feature_selection_lizeo.Rdata", Sys.getenv ("ABS_TOP_SRCDIR")))
Sys.setlocale ("LC_ALL", "fr_FR.UTF-8")
library ("magrittr")
plot <- (feature_selection_lizeo
%>% dplyr::filter (algorithm != "rsms_full")
%>% dplyr::mutate (algorithm = ifelse (algorithm == "rsms", "\\textbf{RSMS}", algorithm))
%>% dplyr::mutate (algorithm = ifelse (algorithm == "mifs", "MIFS", algorithm))
%>% dplyr::mutate (algorithm = ifelse (algorithm == "rfs", "RFS", algorithm))
%>% dplyr::mutate (`% de variables sélectionnées` = n_features / max (n_features))
%>% dplyr::select (`Algorithme` = algorithm, `% de variables sélectionnées`, `aRMSE` = armse)
%>% dplyr::group_by (Algorithme, `% de variables sélectionnées`)
%>% dplyr::summarize (aRMSE = min (aRMSE))
%>% ggplot2::ggplot (ggplot2::aes (x = `% de variables sélectionnées`, y = aRMSE, color = Algorithme, linetype = Algorithme))
+ ggplot2::geom_line ()
+ ggplot2::scale_linetype_manual (values = c ("\\textbf{RSMS}" = "solid", "MIFS" = "dashed", "RFS" = "twodash"))
+ ggplot2::scale_color_manual (values = c ("\\textbf{RSMS}" = "#E69F00", "MIFS" = "#56B4E9", "RFS" = "#009E73"))
+ ggplot2::scale_x_continuous (trans = 'log10', labels = scales::percent))
filename <- Sys.getenv ("OUTPUT")
ggplot2::ggsave (filename, plot, device = "svg", width = 6, height = 3)
|