Fix Recommendation Order for BotorchRecommender #370
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #353
Unintended reordering of discrete search space parts in
BotorchRecommender
was caused during pd.merging by the searchspace being on the left, however it should be on the right and the merge is safest done withhow='left'
while having the numerical points returned by botorch on the left -> the resulting rows will follow their order.A test has been written, perhaps though a little too complicated but anyhow. We can construct a searchspace/target construct where it would be expected that the order of the searchspace is strongly broken when getting recommendations (although I havent been able to create one that is exactly anti-ordered). In the faulty variant the recommendation order would still be monotonically increasing like in the searchspace, while the "correct" order is roughly anti-ordered, or strictly speaking
not monotonically increasing