-
Notifications
You must be signed in to change notification settings - Fork 29
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
Batch constraint for DoE #310
Comments
Agreed. Do you plan to prepare a pull-request for this? |
Yes. As soon as we implement it, we make a pull request as well. |
Very good point, I have thought about this already for a long time, as consequence I discussed this for the BO Part with the botorch guys (pytorch/botorch#1737) and implemented a missing featue for this into botorch pytorch/botorch#1757. The way it is handled by the SLSQP in botorch should be directly applicable also to the ipopt optimier used in DoE, namely by imposing a set of additional equality constraints along the batch dimension. Note that also the polytope sampler from botorch which is also used in bofire is able of handling this when sampling from a constrained polytope, so we can easily make this available for our The open question for me is only how to make this available API wise. I would opt for implementing a new type of constraints like this: class BatchConstraint(Constraint):
type: str
class BatchEqualityConstraint(BatchCostraint):
type: Literal["BatchConstraint"] = "BatchConstraint"
feature: str This would mean that in one batch generated by a strategies the feature provided in the @bertiqwerty : what do you think? |
@jduerholt That is great news! We also want to have this type of constraint for the DoE part. Here, however, multiple batches are intended to be optimized jointly. So we need some field to communicate the number of equality constraints that need to be generated. I would opt for a field |
@dlinzner-bcs Hmm, I do not understand what you mean with "multiple batches are intended to be optimized jointly". In my view, you would ask for example for 10 candidates and you want that within this batch of 10 candidates feature with key "a" has always the same equal value. Or do I overlook something? Concerning multiple variables/features: then provide several of the constraints to the domain, for every feature that should have the same value a new constraint, from my point of view, this is much cleaner. What do you think? |
@jduerholt what I mean is the following. I have some parameters that are easy to vary, while others are hard. For example I make 3 batches of cookie dough with different recipes. From each of those batches I create 3 cookies that I bake at 5 different temperatures ;). I want to create an DoE for this. I learned yesterday that this constraint has a name "split plot design". It comes from agriculture, where you create experiments for different plots of land... Then, we can not work with feature specific constraints, as multiple features at once are kept at the same value for some rows. So there is variation between batches, but less as in an unconstrained design. |
@jduerholt I started implementing such a new constraint class some days ago. If you and the rest agree on realizing the batch constraints as a new constraint class feel free to assign the issue to me if you like :) |
@dlinzner-bcs yes I think so. This would even be possible with only one batch constraint, bc I had in mind that the user can specify which variables should be affected by the batch constraint (does this make sense? @jduerholt did you also intend to do it in this way?). So in your example i would define one batch constraint affecting "sugar", "milk" and "chocolate", but not "temperature". |
I am not 100% sure, does your example consists of three batches (green, yellow, red), or is it one big batch? |
Three batches. |
And do you want to get these batches with one call to |
With one .ask() call. I view it as a single constrained DoE. So the batches should still try to maximize the D-criterion for example. |
I want to design a DoE for cookie dough - so I need to find the best way of varying the recipe still. The world of bakery depends on this! |
Then, I think you are correct, we have to define the constraint as you said using features and multiplicity. @Osburg what do you think? |
I assumed that in a scenario where we have a batch constraint it should apply to each set of |
Hmm, I have a bit the feeling, that it could be much easier to discuss this in a call? Should I setup one for next week to discuss it? |
From partner interactions we learnt that some parameters can only be varried batch-wise i.e., formulation parameters of the material and process parameters e.g., temperature. Currently we only have a heuristic way to implement it that only finds suboptimal designs. Thus, we are interesting in adding a new type of constraint that enforces a batch structure in the design. The way to achieve this is by adding equality constraints across rows.
The text was updated successfully, but these errors were encountered: