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!