Skip to content
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

Bayesian Quadrature using different kernels #470

Open
adrenel1ne opened this issue Jan 29, 2025 · 1 comment
Open

Bayesian Quadrature using different kernels #470

adrenel1ne opened this issue Jan 29, 2025 · 1 comment

Comments

@adrenel1ne
Copy link

Hi there!

I am using emukits 0.4.11 version for Bayesian Quadrature! I want to try different kernels and also (if thats possible) lineair combinations of them and also optimize their hyperparameters. I had something like the following:

kernel2 = GPy.kern.src.static.White(2)
kernel3 = GPy.kern.RatQuad(2,  ARD=True, power=1)
kernel4 = GPy.kern.RBF(2, lengthscale=0.2, variance=1)
kernel5 = GPy.kern.Bias(2, variance=100)
kernel = kernel1 + kernel2 + kernel3+ kernel4 + kernel5
gpy_model = GPy.models.GPRegression(X=X_data, Y=force_data, kernel=kernel)
emukit_rbf = RBFGPy(gpy_model.kern)
emukit_measure = LebesgueMeasure.from_bounds(bounds=[(lb_1, ub_1), (lb_2, ub_2)])
emukit_qrbf = QuadratureRBFLebesgueMeasure(emukit_rbf, emukit_measure)
emukit_model = BaseGaussianProcessGPy(kern=emukit_qrbf, gpy_model=gpy_model)
emukit_method = VanillaBayesianQuadrature(base_gp=emukit_model, X=X_data, Y=force_data)

which does run (and also the emukit_method.optimize() does run, however, it does not accept any parameters (I want to set verbose=True).

However, this method uses the RBFGPy to wrap the GPy kernel to an emukit kernel - is this possible? I wasnt so sure, so I also tried:



emukit_measure = LebesgueMeasure.from_bounds(bounds=[(lb_1, ub_1), (lb_2, ub_2)])
emukit_model = create_emukit_model_from_gpy_model(gpy_model, measure=emukit_measure)


emukit_method = VanillaBayesianQuadrature(base_gp=emukit_model, X=X_data, Y=force_data)

,
but here, the create_emukit_model_from_gpy_model cannot handle the summation of the different kernels.

But the first method looks working, but I just wanted to be sure that it is not turning my combination of kernels into another RBF kernel

@adrenel1ne
Copy link
Author

I believe I might need to tag @mmahsereci here as well :) , thanks in advance!

@adrenel1ne adrenel1ne reopened this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant