-
Hello, I am wondering how I should deal with invalid samples returned from my search space. Assume that I have a discrete search space, with each sample representing an encoded configuration in some target domain (not relevant for my question). Due to the way search-spaces are handled in Ax (to the best of my knowledge, we cant exclude specific samples from the search space), it might happen that a particular sample drawn from the search space is not actually a valid one (with respect to the concrete domain). How should I tell the model about it? I am basically following the tutorial here https://botorch.org/tutorials/closed_loop_botorch_only and I get that for an unconstrained problem, I could simply just return a large value from my evaluation-function, effectively leading to particular samples being "ignored". However, how should I deal with the constraint (because the constraint is evaluated based on valid samples)? I fear that if I return large values for both objective and constraint (you can assume here that for both objective and constraint, smaller values are better), the optimization process might tend to completely ignore certain areas of my search space - even though there might be fitting samples close by. Thanks for any suggestions! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Do you know a priori whether a sample is feasible or not? Or do you have to evaluate the function you're trying to optimize in order to find that out? In the former case, this constraint would ideally be encoded as part of the search space. If that's not easily possible, an alternative (if the cardinality of the search space is not too large) would be to just generate the candidates manually, evaluate the acquisition function and pick the candidate with the highest value. See e.g. facebook/Ax#771 (comment). I the latter case, then one option would be to build a classification model for trial failures and use that in conjunction with an outcome model, similar to what is discussed in #1042 (comment). We don't have that fully packaged and ready to go, but @j-wilson has been working on such a model and hopefully we can have a botorch tutorial and an Ax model for this in the not too distant future. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick help, the solution (former case + generate the candidates manually) is perfect! |
Beta Was this translation helpful? Give feedback.
Do you know a priori whether a sample is feasible or not? Or do you have to evaluate the function you're trying to optimize in order to find that out?
In the former case, this constraint would ideally be encoded as part of the search space. If that's not easily possible, an alternative (if the cardinality of the search space is not too large) would be to just generate the candidates manually, evaluate the acquisition function and pick the candidate with the highest value. See e.g. facebook/Ax#771 (comment).
I the latter case, then one option would be to build a classification model for trial failures and use that in conjunction with an outcome model, similar to what is discussed in #1042 …