automl / fanova

Functional ANOVA
122 stars 45 forks source link

Unassigned variable for marginal plot #85

Closed janvanrijn closed 5 years ago

janvanrijn commented 5 years ago

Library crashes when invoking the function Visualizer.plot_marginal() with a non-categorical hyperparameter.

Reason:

            # PREPROCESS
            if log_scale is None:
                log_scale = self.cs_params[param].log or (np.diff(grid).std() > 0.000001)

The variable grid has not been assigned/defined. Shall I proceed and remove it for now? What is the exact use of this variable?

shukon commented 5 years ago

This is probably my fault. Fixed in master by swapping lines. I think the statement is supposed to be kind of an autodetection whether log-scale would improve plot quality, so I'd leave it in. I changed default behaviour to only do autodetection when log-scale is not set in function parameters (before it just ignored the argument when np.diff(grid).std() > 0.000001, but I think the user should be able to force log-scale if appropriate.)