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 batch recommendation #348

Merged
merged 14 commits into from
Sep 3, 2024
Merged

Fix batch recommendation #348

merged 14 commits into from
Sep 3, 2024

Conversation

AdrianSosic
Copy link
Collaborator

When the non-GP surrogates where added, they were not designed with batch recommendations in mind. Now that batch recommendations can be generally requested, surrogate models providing only marginal posterior information yield unusable results for batch sizes larger than one.

This PR fixes the issue by:

  • Making the RandomForestSurrogate produce a proper EnsemblePosterior that is capable of expressing covariance structure, which is the basic requirement for batch prediction
  • Disallowing batch sizes larger than one for surrogates that only provide marginal posteriors

@AdrianSosic AdrianSosic added the bug Something isn't working label Aug 23, 2024
@AdrianSosic AdrianSosic self-assigned this Aug 23, 2024
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.

Not sure whether I fully understand some of the changes made here. In general this looks good, but I'd appreciate some details since I do not know if I understood everything correctly

CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
baybe/exceptions.py Show resolved Hide resolved
baybe/surrogates/utils.py Show resolved Hide resolved
baybe/surrogates/ngboost.py Show resolved Hide resolved
baybe/surrogates/ngboost.py Show resolved Hide resolved
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.

Since all of my question are just minor/my understanding, feel free to resolve as you see fit :)

@AdrianSosic AdrianSosic merged commit 1e387b0 into main Sep 3, 2024
10 of 11 checks passed
@AdrianSosic AdrianSosic deleted the fix/random_forest branch September 3, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants