-
Notifications
You must be signed in to change notification settings - Fork 27
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
Refactor random strategy #347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Johannes. I left 2 comments. Please have a quick look and merge as you like.
@@ -2,6 +2,7 @@ | |||
|
|||
from bofire.data_models.strategies.doe import DoEStrategy | |||
from bofire.data_models.strategies.factorial import FactorialStrategy | |||
from bofire.data_models.strategies.polytope import PolytopeSampler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are now also strategies that are called Sampler
the naming becomes somewhat inconsistent, no? RandomStrategy
is also just a sampling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully agree, but I do not have a proper solution, how would you do the naming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... The easiest would be that all are strategies. Which they are. With samplers we probably mean not-predictive, right? Then we would call DoE a sampler and Random also a sampler. Depends on what sampler actually means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it means non-predictive. And something like PolytopeStrategy
sounds weird ..., I think I will merge this PR first and we create an issue to solve this naming problem, ok? Or perhaps just schedule a meeting ...
This PR refactors the random strategy: instead of using either polytope sampling or rejection sampling, it uses now a combination of both which allows for the handling of more constraint types by the random strategy.
Docstrings will be also updated.