summaryrefslogtreecommitdiff
path: root/images/featureselectionlizeofull.R
diff options
context:
space:
mode:
Diffstat (limited to 'images/featureselectionlizeofull.R')
-rw-r--r--images/featureselectionlizeofull.R19
1 files changed, 19 insertions, 0 deletions
diff --git a/images/featureselectionlizeofull.R b/images/featureselectionlizeofull.R
new file mode 100644
index 0000000..c861e28
--- /dev/null
+++ b/images/featureselectionlizeofull.R
@@ -0,0 +1,19 @@
+#!/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 %in% c ("rsms_full", "rsms"))
+ %>% dplyr::mutate (algorithm = ifelse (algorithm == "rsms_full", "\\textbf{par époques}", algorithm))
+ %>% dplyr::mutate (algorithm = ifelse (algorithm == "rsms", "par sous-ensemble", algorithm))
+ %>% dplyr::mutate (`Nombre de variables` = n_features / max (n_features))
+ %>% dplyr::select (`Variante` = algorithm, `Nombre de variables`, `aRMSE` = armse)
+ %>% dplyr::group_by (Variante, `Nombre de variables`)
+ %>% dplyr::summarize (aRMSE = min (aRMSE))
+ %>% ggplot2::ggplot (ggplot2::aes (x = `Nombre de variables`, y = aRMSE, color = Variante, linetype = Variante))
+ + ggplot2::geom_line ()
+ + ggplot2::scale_linetype_manual (values = c ("\\textbf{par époques}" = "solid", "par sous-ensemble" = "dashed"))
+ + ggplot2::scale_color_manual (values = c ("\\textbf{par époques}" = "#0072B2", "par sous-ensemble" = "#E69F00"))
+ + ggplot2::scale_x_continuous (trans = 'log10', labels = scales::percent))
+filename <- Sys.getenv ("OUTPUT")
+ggplot2::ggsave (filename, plot, device = "svg", width = 6, height = 3)