experimental-design / bofire

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

Fix for categorical features that are fixed in fully categorical BO #295

Closed simonsung06 closed 1 year ago

simonsung06 commented 1 year ago

When all input features in an optimization are categorical/discrete, if only one category is allowed for the categorical features, then it will break. This is because the fixed feature is not included when self.domain.inputs.get_categorical_combinations() is used to generate the choices DataFrame. This results in the subsequent merged DataFrame having a column of NaN's for the fixed feature

This PR will fix this issue by adding in the fixed feature into choices before generating merged.

I have not included a test yet for this because I am not sure on where to place it in the folder. @jduerholt Where is the best place for this?