2
$\begingroup$

I'd like to use Bayesian optimization over a pair of features, one nominal, one numerical. If I do something like this:

bo = BayesianMinimization[Null, {{"A", 10}, {"B", 100}}, 
InitialEvaluationHistory -> {{"A", 100} -> 100, {"B", 10} -> 10}, 
MaxIterations -> 0];

And look at the resulting PredictorFunction by evaluating bo["PredictorFunction"], I see that it defaults to a text feature type for the first entry, which is incorrect (they're distinct categories and it shouldn't try to interpolate in text-space.) Predict and friends handle this using the FeatureTypes option, and checking the Options of BayesianMinimization, I see that FeatureTypes is a valid, albeit undocumented, option. However, it seems to have no effect, as modifying the above to the following:

bo=BayesianMinimization[Null,{{"A",10},{"B",100}},InitialEvaluationHistory->  
{{"A",100}->100,{"B",10}->10},MaxIterations->0,FeatureTypes->
{"Nominal","Numerical"}];

still results in a PredictorFunction whose first argument is of type text instead of nominal.

And the behavior is a little erratic. For example this:

bo = BayesianMinimization[<|{"A", 10.} -> 10, {"B", 100.} -> 
100|>[#] &, {{"A", 10.}, {"B", 100.}}, MaxIterations -> 2]

automatically defaults to a nominal feature for the first entry, so how it decides whether a feature is text or nominal seems arbitrary. This latter example doesn't solve my problem because I don't want to supply BayesianMinimization with a function that it evaluates (all the evaluations are done off-line and are being fed to BayesianMinimization through InitialEvaluationHistory instead of allowing it to directly evaluate a function.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.