SheffieldML / GPyOpt

Gaussian Process Optimization using GPy
BSD 3-Clause "New" or "Revised" License
929 stars 261 forks source link

Multi-objective optimisation #306

Open xseryda opened 4 years ago

xseryda commented 4 years ago

Hello,

is there a possibility for multiobjective optimisation?

e.g.

def f(x):
    return np.sin(x[0]*x[1]), np.sin((x[0]*x[1])**2)  # pseudoexample

bounds = [{'name': f'var_x', 'type': 'continuous', 'domain': (-10, 10)},
          {'name': f'var_y', 'type': 'continuous', 'domain': (-10, 10)}]

max_iter = 3
myProblem = GPyOpt.methods.BayesianOptimization(f, bounds)
myProblem.run_optimization(max_iter)
print(myProblem.x_opt)  # will be pareto_front
print(myProblem.fx_opt)  # evaluation of pareto_front

If not, do you have any plans to implement the multiobjective optimisation?

Thanks.

apaleyes commented 4 years ago

No, we don't have any plans to implement it, i am afraid. Of late, there is very limited active development going on in GPyOpt, certainly no new features.

fwiw, we have a new lib Emukit, which has been our main focus for the past year and a half. It has some support for multi-output GPs, but no multi-objective capabilities at the moment. It is entirely possible it might be implemented in Emukit, although I won't be able to give any timeframe at this time.

ekalosak commented 4 years ago

You might try collapsing the two objectives into a single objective with a "trade-off" parameter - this approach is used pretty widely e.g. when balancing exploration and exploitation (though that's in the acquisition function - same principle here.) Your trade-off parameter could be o1,o2=your_func(X); y=trade_off(o1,o2,alpha) where e.g. trade_off = lambda o1,o2,a: (a*o1)+((1-a)*o2) for \alpha\in[0,1].

xseryda commented 4 years ago

About the Emukit, does its Bayesian optimisation contain all the features of the GPyOpt Bayesian optimisation? Namely what I am looking for is:

apaleyes commented 4 years ago

@xseryda Answer to all three is yes, third one can be done via local penalization, which is implemented.

AmosJoseph commented 4 years ago

You might try collapsing the two objectives into a single objective with a "trade-off" parameter - this approach is used pretty widely e.g. when balancing exploration and exploitation (though that's in the acquisition function - same principle here.) Your trade-off parameter could be o1,o2=your_func(X); y=trade_off(o1,o2,alpha) where e.g. trade_off = lambda o1,o2,a: (a*o1)+((1-a)*o2) for \alpha\in[0,1].

Excuse me,how to conduct Multi-objective optimisation in GPyOpt? Would you like to give an example?

Best!