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

Fix acqusistion function bug when std output by GP is 0.0 #379

Conversation

csbo98
Copy link

@csbo98 csbo98 commented Nov 17, 2022

In order to calculate the acquisition function EI and PI for a given point x, we will use mean and std output by the gaussian process. However, std may be 0.0(e.g., the gaussian process will set std to 0.0 when we sample a point x that has been sampled before), which will cause an error when calculating EI and PI. In function _ei, when std is 0.0, we can't calculate the EI value using a * norm.cdf(z) + std * norm.pdf(z), instead, we should set the EI value to 0.0. So does function _poi. Therefore, I changed function _ei and _poi to fix this bug.
I refer to Acquisition functions in Bayesian Optimization, which discussed the acquisition function in detail and explained the derivation process of PI and EI

…ere the std output by gaussian process is 0.0.
@bwheelz36
Copy link
Collaborator

Do you have an example script where this error is occurring?

@till-m till-m closed this May 2, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants