Boom
Boom

Reputation: 1315

what is the kappa variable (BayesianOptimization)

I read some posts and tutorials about BayesianOptimization and I never saw explanation about kappa variable.

Upvotes: 4

Views: 1542

Answers (2)

K3---rnc
K3---rnc

Reputation: 7049

kappa parameter stands for the number of standard deviations to take from the mean before ordering candidate solutions by utility, at least that's how it seems to be implemented in SAMBO Optimization package e.g. in:

https://github.com/sambo-optimization/sambo/blob/ec7433286915d71bb7bb8f4e38758eca5c7171f6/sambo/_smbo.py#L18

mean - np.outer(kappa, std)

This appears to be lower confidence bound / LCB method. Method UCB, mentioned in another answer, just has a changed sign (mean + k*std).

Fiddling with the kappa parameter favors either search algorithm's exploration (of areas with large std) or exploitation (of well-understood areas with low std).

Upvotes: 0

makeyourownmaker
makeyourownmaker

Reputation: 1833

The kappa parameter, along with xi, is used to control how much the Bayesian optimization acquisition function balances exploration and exploitation.

Higher kappa values mean more exploration and less exploitation and vice versa for low values. Exploration pushes the search towards unexplored regions and exploitation focuses on results in the vicinity of the current best results by penalizing for higher variance values.

It may be beneficial to begin with default kappa values at the start of optimization and then lower values if you reduce the search space.

In scikit-optimize, kappa is only used if the acquisition function acq_func is set to “LCB” and xi is used when acq_func is “EI” or “PI” where LCB is Lower Confidence Bound, EI is Expected Improvement and PI is Probability of Improvement.

Similarly for the BayesianOptimization package:

 acq: {'ucb', 'ei', 'poi'}
            The acquisition method used.
                * 'ucb' stands for the Upper Confidence Bounds method
                * 'ei' is the Expected Improvement method
                * 'poi' is the Probability Of Improvement criterion.

Mathematical details on acquisition functions

Note, the BayesianOptimization package and scikit-optimize use different default kappa values: 2.576 and 1.96 respectively.

There is a decent exploration vs exploitation example in the scikit-optimize docs.

There is a similar BayesianOptimization exploration vs exploitation example notebook.

FWIW I've used both packages and gotten OK results. I find the scikit-optimize plotting functions to be useful when fine tuning the parameter search space.

Upvotes: 2

Related Questions