Closed Osburg closed 9 months ago
Hi @Osburg,
I am not 100% sure, that I understood it, so I try to give it with my words:
So you want to come up with a new strategy in BoFire which could be called for example UniversalSampler
. This new sampler uses then find_local_max_ipopt
and the space filling criterion to come up with new samples. Correct?
This would then also resolve the point from @simonsung06 that the space filling criterion would be somehow incompliant with the DoEStrategy
. Correct?
The new Strategy would then somehow look like this:
class UniversalSampler(Sampler):
type: Literal['UniversalSampler'] = 'UniversalSampler'
base_samples: int
ipopt_options: Dict[str, str]
If I understand this correct, then I like the idea!
Best,
Johannes
Hi Johannes :),
yes, this is exactly what I was talking about. Towards @simonsung06's point in #307 : I think this one would remain since his argument why DoEStrategy
should have an optional argument for the optimality criterion ist still valid, right?
Cheers Aaron
Hi Aaron,
I agree that the DoEStrategy
would still have an optional argument for the optimality criterion, but we would not allow for space filling criterion there. Makes sense?
Best,
Johannes
Ah, yes it does! Then let's do it like this. You can assign this issue to me if you like.
If I have not overlooked something we currently do not have a sampler for nonlinear equality constraints. As @simonsung06 pointed out in #307, the
OptimalityCriterionEnum.SPACE_FILLING
objective only depends on the domain, so I had the idea that we could possibly use this objective to add a sampler supporting a wide range of constraints, including nonlinear equality constraints (and batch constraints as soon as they are supported in doe). Warning: only naive ideas and handwaving arguments are following. The general idea is to callfind_local_max_ipopt
with space filling objective on the domain in the_ask
method. This will create a number of points which are "uniformly" distributed over the feasible set, while all constraints thatfind_local_max_ipopt
can handle are supported. These points are treated as candidates for the sampling. From these candidates we draw a certain percentage to be returned by_ask
. Intuitively, the returned candidates should represent a somewhat uniform distribution on the feasible set. The last step is intended to avoid sampling preferably in the boundary region of the feasible set: since the space filling objective will always lead to at least some points lying at the boundary of the feasible set, returning all candidates would destroy the "uniformity" of the distribution. Instead, we create a carpet of candidates populating the feasible set and then randomly pick some of them. For domains of high input dimension this will certainly not be a good solution to create samples in reasonable time, but in lower dimensional settings it could be an option. In the small example below we sample 50 points from a spherical surface, I hope this illustrates a little bit what the general idea is. Yellow points are the "carpet of candidates", the black points are a random sample drawn from the candidate set.@jduerholt (or anyone else interested) What do you think about the idea, does it make any sense to you? Can we even make use of such a sampling method? If you think this could be a good idea feel free to assign this issue to me, then I will take care of it somewhen these days.