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

Access to the surrogate model through C API? #23

Open
jbrea opened this issue Oct 27, 2018 · 2 comments
Open

Access to the surrogate model through C API? #23

jbrea opened this issue Oct 27, 2018 · 2 comments

Comments

@jbrea
Copy link

jbrea commented Oct 27, 2018

Hi

I like your package and wrote a little julia wrapper.

One thing I couldn't easily figure out was how to access the surrogate model after fitting (my C++ is a bit limited). Is there an easy way (ideally through functions similar to the ones in the current C API) to access the surrogate model (e.g. inspect kernel parameters, sampling from the model or evaluating mean and sigma for some inputs)?

@rmcantin
Copy link
Owner

Thanks for the wrapper! If you want to integrate it in the library, please send me an email rmcantin@unizar.es and I'll help you with that.

Right now the C API is only a wrapper of the full optimization call. You can't even perform step by step optimization. I have been wanting to refactor the C API and make it more general for a while, but it would require a whole redesign of the API for all languages.

If you want to see how to access the surrogate model from C++, you can see how it is displayed in the examples, using this helper class https://github.com/rmcantin/bayesopt/blob/master/utils/displaygp.cpp

@jbrea
Copy link
Author

jbrea commented Dec 2, 2018

Thanks for your response.

I think there is no need to integrate the wrapper here. Julia packages are usually in their separate github repository anyway. But feel free to advertise it here 😄.

On an unrelated note, do I understand correctly that the implementation of Thompson sampling simply samples a value from the GP for every input given by the optimizer in the acquisition function? If yes, does this really lead to samples from the maximum distribution in the case of continuous input spaces?
Do you think there would be some benefit in using methods like the one proposed in https://arxiv.org/abs/1604.00169?

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

2 participants