Skip to content

Commit

Permalink
add param name on the x-axis in plot_categorical_marginal()
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronkl committed Apr 20, 2015
1 parent 5cf4495 commit 1c59b59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyfanova/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def plot_categorical_marginal(self, param):
plt.bar(indices, mean, width, color='red', yerr=std)
plt.xticks(indices + width / 2.0, labels)
plt.ylabel("Performance")
plt.xlabel(param_name)

return plt

Expand Down Expand Up @@ -149,7 +150,7 @@ def plot_marginal(self, param, lower_bound=0, upper_bound=1, is_int=False, resol
dim = self._fanova.param_name2dmin[param]
param_name = param

if param_name not in self._fanova.get_config_space().get_integer_parameters() or param_name not in self._fanova.get_config_space().get_continous_parameters():
if param_name not in self._fanova.get_config_space().get_integer_parameters() or param_name not in self._fanova.get_config_space().get_continuous_parameters():
print "Parameter %s is not a continous or numerical parameter!" % (param_name)

grid = np.linspace(lower_bound, upper_bound, resolution)
Expand Down

0 comments on commit 1c59b59

Please sign in to comment.