baybe
baybe copied to clipboard
Botorch with cardinality constraint via sampling
This PR attempts to support cardinality constraints in botorch recommender. The core idea is
- Determine several configurations of inactive parameters (parameters that have to be zeros) based on the cardinality constraints.
- Optimize the acquisition function for different configurations and pick the best one.
There are two mechanisms for determining the configuration of inactive parameters.
- When the combinatorial list of different inactive parameter configurations is not too large, we iterate the full list;
- otherwise a fixed amount of inactive parameter configurations are randomly chosen.
In addition, a validation is added to ensure that zero is included in the bounds of all cardinality constraint parameters.