-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to "suggest" just a configuration out of a fixed list? #17
Comments
We don't have a special API for that, but it's possible in HEBO with the For example, let's say you want to minimize import pandas as pd
from hebo.design_space import DesignSpace
from hebo.optimizers.hebo import HEBO
def obj_func(param):
return (param['x'].values**2).reshape(-1, 1)
space = DesignSpace().parse([{'name' : 'x', 'type' : 'num', 'lb': -10, 'ub' : 10}])
opt = HEBO(space)
initial_suggest = pd.DataFrame([{'x' : 3}, {'x' : -5}])
opt.observe(initial_suggest, obj_func(initial_suggest))
for i in range(3):
rec = opt.suggest()
opt.observe(rec, obj_func(rec))
print(opt.X) |
It is not enough with The code should be modified as follows: ......
initial_suggest = pd.DataFrame([{'x' : 3}, {'x' : -5}])
initial_suggest = opt.suggest(n_suggestions=1, fix_input = initial_suggest)
opt.observe(initial_suggest, obj_func(initial_suggest))
...... |
Thank you for the reply. I actually mean a set of fixed configurations to observe, not only initial configurations. For instance, if we want to optimize "learning rate" from an arbitrary list : [1e-5, 3e-5, 6e-5, 7e-5, 4e-4, 5e-2, 8e-1], Best, |
Hello Sebastian, For now I think the best option would consist in considering "lr" as an integer parameter with lower bound 1 and upper bound the size of your list L (so for L = [1e-5, 3e-5, 6e-5, 7e-5, 4e-4, 5e-2, 8e-1] it would be 6) and to make your blackbox convert the suggestion |
In HEBO there are different spaces designs, such a Integer, StepInteger, etc... I was wondering if it is possible to have just a list of possible configurations that we want to be suggested and subsequently observe.
Best,
Sebastian
The text was updated successfully, but these errors were encountered: