experimental-design / bofire

Experimental design and (multi-objective) bayesian optimization.
https://experimental-design.github.io/bofire/
BSD 3-Clause "New" or "Revised" License
188 stars 22 forks source link

Universal constraint sampler #328

Closed Osburg closed 7 months ago

Osburg commented 8 months ago

This PR adds a new sampler that supports nonlinear/linear equality/inequality constraints and NChooseKConstraints as discussed in #314. This only works for continuous inputs. In principle also batch constraints (and all other constraints you can compute a jacobian for) are supported, but since the returned sample is sampled from a larger set of candidates, the batch structure is no longer respected. By adapting the sampling logic in this last step this method can be made available for batch constraints. Closes #314.

jduerholt commented 8 months ago

Hi @Osburg,

Thanks for the PR, I will have a look over the Christmas days. Sorry for the delay.

Best,

Johannes

Osburg commented 8 months ago

is it on purpose that you inherit from the SamplerStrategy, because then you also inherit from their the handling of NChooseKs, which is totally fine for me, but I just wanted to ask ;)

Thanks for pointing this out :) This was not my intention, I did not pay attention apparently. So I guess I should let UniversalConstraintSampler inherit from Strategy instead?

jduerholt commented 8 months ago

Yep, I would then recommend to inherit from Strategy.