From 43c18761d6ce95ad51bc73179978b4f09f1a5119 Mon Sep 17 00:00:00 2001
From: Luc Giffon <luc.giffon@lis-lab.fr>
Date: Sun, 29 Mar 2020 10:04:49 +0200
Subject: [PATCH] update results processing scripts

---
 code/vizualisation/csv_to_figure.py  | 16 +++++++++-------
 code/vizualisation/results_to_csv.py |  3 ++-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/code/vizualisation/csv_to_figure.py b/code/vizualisation/csv_to_figure.py
index 244314b..bfe1f5e 100644
--- a/code/vizualisation/csv_to_figure.py
+++ b/code/vizualisation/csv_to_figure.py
@@ -14,10 +14,12 @@ lst_task_train_dev = ["coherence", "correlation"]
 tasks = [
     # "train_score",
     # "dev_score",
-    # "test_score",
-    "coherence",
-    "correlation",
-    # "negative-percentage"
+    "test_score",
+    # "coherence",
+    # "correlation",
+    # "negative-percentage",
+    "dev_strength",
+    "test_strength"
 ]
 
 dct_score_metric_fancy = {
@@ -33,7 +35,7 @@ dct_color_by_strategy = {
     "OMP Distillation w/o weights": (255, 128, 0), # orange
     "OMP w/o weights": (255, 128, 0), # orange
     "Random": (0, 0, 0), # black
-    "Zhang Similarities": (255, 255, 0), # jaune
+    "Zhang Similarities": (255,105,180), # rose
     'Zhang Predictions': (128, 0, 128), # turquoise
     'Ensemble': (0, 0, 255), # blue
     "Kmeans": (0, 255, 0) # red
@@ -81,7 +83,7 @@ tpl_transparency = (0.1,)
 if __name__ == "__main__":
 
     load_dotenv(find_dotenv('.env'))
-    dir_name = "bolsonaro_models_25-03-20"
+    dir_name = "bolsonaro_models_27-03-20_v2"
     dir_path = Path(os.environ["project_dir"]) / "results" / dir_name
 
     out_dir = Path(os.environ["project_dir"]) / "reports/figures" / dir_name
@@ -134,7 +136,7 @@ if __name__ == "__main__":
             title = "{} {}".format(task, data_name)
             yaxis_title = "% negative weights" if task == "negative-percentage" else dct_score_metric_fancy[score_metric_name]
             fig.update_layout(barmode='group',
-                              title=title,
+                              # title=title,
                               xaxis_title="# Selected Trees",
                               yaxis_title=yaxis_title,
                               font=dict(
diff --git a/code/vizualisation/results_to_csv.py b/code/vizualisation/results_to_csv.py
index 669451b..6b078b6 100644
--- a/code/vizualisation/results_to_csv.py
+++ b/code/vizualisation/results_to_csv.py
@@ -64,7 +64,8 @@ set_no_corr = set()
 if __name__ == "__main__":
 
     load_dotenv(find_dotenv('.env'))
-    dir_name = "results/bolsonaro_models_25-03-20"
+    # dir_name = "results/bolsonaro_models_25-03-20"
+    dir_name = "results/bolsonaro_models_27-03-20_v2"
     dir_path = Path(os.environ["project_dir"]) / dir_name
 
     output_dir_file = dir_path / "results.csv"
-- 
GitLab