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

MIN mode via acquisition function #340

Merged
merged 4 commits into from
Aug 30, 2024
Merged

MIN mode via acquisition function #340

merged 4 commits into from
Aug 30, 2024

Conversation

AdrianSosic
Copy link
Collaborator

@AdrianSosic AdrianSosic commented Aug 9, 2024

This PR changes the behavior of NumericalTarget in MIN mode in that the minimization is lo longer implement by negating the computational representation of the target but placing an objective on the acquisition function.

This approach avoids the problem that otherwise the surrogate would be trained on inverted targets, resulting in inverted predictions, which prevents us from exposing the surrogate as-is to the user. Also, it cleanly separates the objective (i.e. "minimization") from the target representation.

@AdrianSosic AdrianSosic self-assigned this Aug 9, 2024
@AdrianSosic AdrianSosic marked this pull request as ready for review August 9, 2024 14:30
Copy link
Collaborator

@AVHopp AVHopp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. However, since this seems to be based on another branch, I might have missed some stuff. Please ping me once the corresponding branch was merged, I'd like to just quickly recheck then

baybe/acquisition/base.py Outdated Show resolved Hide resolved
baybe/acquisition/base.py Show resolved Hide resolved
baybe/acquisition/base.py Show resolved Hide resolved
@Scienfitz
Copy link
Collaborator

@AVHopp wanted to be pinged after reabase

streamlit/surrogate_models.py Outdated Show resolved Hide resolved
baybe/acquisition/base.py Show resolved Hide resolved
@AdrianSosic AdrianSosic force-pushed the refactor/min_targets branch from d158c45 to c262ce8 Compare August 30, 2024 10:46
@AdrianSosic AdrianSosic merged commit 435c61e into main Aug 30, 2024
11 checks passed
@AdrianSosic AdrianSosic deleted the refactor/min_targets branch August 30, 2024 11:12
AdrianSosic added a commit that referenced this pull request Jan 23, 2025
This PR fixes a critical bug introduced in #340 that has been present
since version `0.10.1` and adds a corresponding test. The bug occurs
when using improvement-based Monte Carlo acquisition functions (such as
the default `qLogExpectedImprovement`) in with a single numerical target
in `MIN` mode. The cause was a missing inversion of the `best_f`
reference value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants