-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Gaussian Process regressor does not fit all the points #513
Comments
Hi @jorisparet, fitting the GP is expensive. If you don't continue with the optimization then fitting the GP is not necessary -- unless you manually use it the way you do (but the Hope that helps |
Hi @till-m, OK, I understand the idea. Although, if the optimizer prints out the last evaluated value of the target function during the Again, I'm new to the package, so perhaps my view is a bit different from someone more familiar with Bayesian optimization, but it might be useful to mention it at least in the docs that I'll let you close the issue, in case you think an action is needed (e.g. add a comment in the docs) or not. Thanks for your help and the quick reply. 🙂 |
Hey @jorisparet, IIRC this is not the first time some confusion has been caused by the last point being unfitted. I think you have a good point in that comment in the documentation would be helpful. I'll leave this issue open for now to track that. |
Added, see here :) |
Hello,
I am quite new to the package, so it is likely that I am missing something obvious (my sincerest apologies if this is the case). I have not been able to find an explanation for what I observed, though, so it is probably better to bring it up just in case.
The bug
The Gaussian Process regressor in
optimizer._gp
does not fit all the points sampled by theoptimizer.maximize
method. The last point seems to be left out.Reproduction
I basically ran an example adapted from the documentation (before the recent acquisition function API redesign in #447). Here is the code I used:
Expected behavior$x=5.199$ is not taken into account by the GP. Note that this is the last one sampled from
The predicted mean from the GP should pass through all the points in
x_obs
. The point atoptimizer.minimize
. I tried with different values ofrandom_state
andn_iter
and it seems to be systematic.Screenshot
Environment (please complete the following information):
python
version 3.10.9numpy
version 1.26.4scipy
version 1.14.0bayesian-optimization
version 1.5.1Thank you for your help, cheers.
The text was updated successfully, but these errors were encountered: