Featurize Categorical Hyperparameters
leix28 opened this issue · 1 comments
leix28 commented
- BTB version: 0.2.5-dev
- Python version: 3.6
- Operating System: Mac OS 10.14
Description
Is the categorical hyperparameter handled correctly in BTB?
Right now, categorical hyperparamters are represented as a single float number. For example, if I try to tune
- a string hyperparameter
optimizer
in['adam', 'sgd', 'rmsprop']
- a float hyperparameter
x
in[0, 1]
and I get a few hyperparamter and score pairs
- `(optimizer='adam', x=0.5), score=0.8
- `(optimizer='adam', x=0.6), score=0.9
- `(optimizer='sgd', x=0.5), score=0.3
BTB will convert these pairs to
(0.85, 0.5), 0.8
# 0.85 is the average score of 'adam'(0.85, 0.6), 0.9
(0.3, 0.5), 0.3
# 0.3 is the average score of 'sgd'
and use GaussianProcessRegressor
to fit these 3 pairs.
I'm not sure if this is the correct way to featurize categorical hyperparameters.
How to change the categorical hyperparamter fit_transform and inverse_transform?
A more intuitive way to featurize categorical hyperparamters is one-hot representation. But changing the fit_transform
is CatHyperParameter
is hard.
pvk-developer commented