From 47c16bfa06d773b7f38372917f190a51f363959d Mon Sep 17 00:00:00 2001 From: Michael Hush Date: Fri, 24 Mar 2017 15:42:47 +1100 Subject: [PATCH] Updated bug in visualizations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed a bug where an attribute wasn’t present in the learner class. Was a problem when attempting to plot the visualizations from a file. --- mloop/visualizations.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mloop/visualizations.py b/mloop/visualizations.py index 9f47743..763b649 100644 --- a/mloop/visualizations.py +++ b/mloop/visualizations.py @@ -340,7 +340,7 @@ def plot_params_vs_generations(self): def create_gaussian_process_learner_visualizations(filename, file_type='pkl', plot_cross_sections=True, - plot_all_minima_vs_cost=True, + plot_all_minima_vs_cost=False, plot_hyperparameters_vs_run=True): ''' Runs the plots from a gaussian process learner file. @@ -351,7 +351,7 @@ def create_gaussian_process_learner_visualizations(filename, Keyword Args: file_type (Optional [string]): File type 'pkl' pickle, 'mat' matlab or 'txt' text. plot_cross_sections (Optional [bool]): If True plot predict landscape cross sections, else do not. Default True. - plot_all_minima_vs_cost (Optional [bool]): If True plot all minima parameters versus cost number, False does not. If None it will only make the plots if all minima were previously calculated. Default None. + plot_all_minima_vs_cost (Optional [bool]): If True plot all minima parameters versus cost number, False does not. If None it will only make the plots if all minima were previously calculated. Default False. ''' visualization = GaussianProcessVisualizer(filename, file_type=file_type) if plot_cross_sections: @@ -486,8 +486,7 @@ def plot_all_minima_vs_cost(self): ''' Produce figure of the all the local minima versus cost. ''' - if not self.has_all_minima: - self.find_all_minima() + self.find_all_minima() global figure_counter, legend_loc figure_counter += 1 plt.figure(figure_counter)