From d67e49c8cfed0224a3ca3787284c277fed8dae87 Mon Sep 17 00:00:00 2001
From: Charly LAMOTHE <lamothe.c@intlocal.univ-amu.fr>
Date: Tue, 5 Nov 2019 15:27:49 +0100
Subject: [PATCH] Add some comments in plot_losses

---
 code/bolsonaro/visualization/plotter.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/code/bolsonaro/visualization/plotter.py b/code/bolsonaro/visualization/plotter.py
index a548e1b..9d70587 100644
--- a/code/bolsonaro/visualization/plotter.py
+++ b/code/bolsonaro/visualization/plotter.py
@@ -37,12 +37,20 @@ class Plotter(object):
 
         n = len(all_experiment_scores)
 
+        """
+        Get as many different colors from the specified cmap (here nipy_spectral)
+        as there are curve to plot.
+        """
         colors = Plotter.get_colors_from_cmap(n)
 
+        # For each curve to plot
         for i in range(n):
+            # Retreive the scores in a list for each seed
             experiment_scores = list(all_experiment_scores[i].values())
+            # Compute the mean and the std for the CI
             mean_experiment_scores = np.average(experiment_scores, axis=0)
             std_experiment_scores = np.std(experiment_scores, axis=0)
+            # Plot the score curve with the CI
             Plotter.plot_mean_and_CI(
                 ax=ax,
                 mean=mean_experiment_scores,
-- 
GitLab