JasperSnoek / spearmint

Spearmint is a package to perform Bayesian optimization according to the algorithms outlined in the paper: Practical Bayesian Optimization of Machine Learning Algorithms. Jasper Snoek, Hugo Larochelle and Ryan P. Adams. Advances in Neural Information Processing Systems, 2012

Home Page:http://people.seas.harvard.edu/~jsnoek/software.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why variables of enum are not normalized to [0,1]

luqiuxia opened this issue · comments

In the function to_unit() of file spearmint-lite/ExperimentGrid.py, "int" and "float" type variables are both normalized to [0,1], however, variables of "enum" type are not:
elif variable['type'] == 'enum':
for dd in xrange(variable['size']):
unit[index] = variable['options'].index(v.pop(0))
index += 1
I think we should also convert enum type variables to [0,1] as follows:
unit[index] = self._index_unmap(variable['options'].index(v.pop(0)), len(variable['options']))
since in get_params(self, u), you convert back :
ii = self._index_map(u[index], len(variable['options']))

I wonder whether it is a bug.

Thanks!