SheffieldML / GPyOpt

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

Model Selection for Contextual Problem using gpyopt #273

Open maryami66 opened 4 years ago

maryami66 commented 4 years ago

Hi, I'm doing Bayesian optimization for a contextual problem based on GPy I define kernel of the parameter and kernel of the context given user-defined variance and lengthscale, and the kernel of the model is defined using multiplication of parameter kernel and context kernel:

k_parameters = GPy.kern.RBF(input_dim=1, variance=2., lengthscale=1.) k_context =GPy.kern.RBF(input_dim=1, variance=2., lengthscale=1.) kernel = k_parameters * k_context

I am interested in tuning model hyperparamers: lengthscale and variance of the kernel and noise variance of the observation given 100 something trainset.

X_train = (parameter, context) y_train = Performance

How is it possible to do it in GPyOpt? I have read GPyOpt tutorial, but I could not find the answer. Excuse me if it is a duplicated.

ekalosak commented 4 years ago

This is done automatically when you run myBopt.run_optimization as in e.g. this tutorial.