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

i-optimal designs #337

Open dlinzner opened 7 months ago

dlinzner commented 7 months ago

We have a use-case for i-optimal designs. A colleague (Kai Exner) is currently implementing it.

Osburg commented 7 months ago

Hi @dlinzner-bcs @KaiExner, This sounds nice :) i had a quick look into this when i was implementing the remaining criteria, and the i criterion seemed not so trivial to implement to me. Therefore i am interested in how you are planning to do this. If i understood correctly, the i criterion involves computing integrals over the design space. This is somewhat straightforward if we have no constraints or only linear constraints. But if nonlinear constraints are involved this means we have to integrate over possibly weirdly shaped hypersurfaces. @KaiExner just bc i am curious: how is this supposed to be done? Cheers, Aaron :)

KaiExner commented 7 months ago

Dear @Osburg , the I criterion can be calculated as tr( (Y'Y %*% inv(X'X/nX)) /nY) where X is the model matrix and Y is a space over which I is averaged. nX, nY are the number of rows in X and Y. This approached is used by the optFedrov algorithm in the AlgDesign package in R. optFederov uses Y as a candidate set for an exchange algorithm. In the simple case it is a rectangular grid, if constraints exist, the list is simply checked against the constraints. Options for BoFire: take the analogous route, define Y as rectangular grid and eliminate points that do not meet the constraints or - as @dlinzner proposed - sample from the allowed design space.

Osburg commented 7 months ago

@KaiExner thanks for the explanation, this was helpful!

dlinzner-bcs commented 6 months ago

@KaiExner I think this nice sampler by @Osburg is what you want: https://github.com/experimental-design/bofire/blob/main/bofire/strategies/universal_constraint.py it is to my understanding producing space-filling points within the (constrained) domain.

KaiExner commented 6 months ago

Thanks @dlinzner-bcs - its on my list :)