Bayesian optimization has recently been used to optimize hyperparameters for machine learning.
When I searched for modules that could use Bayesian optimization in python, I found a lot and I wasn't sure which one to use. In the seminar, I heard that it is better to use mutual information than to use UCB for the acquisition function. So when I searched for a python module that could use mutual information, I found BayesOpt. However, I had a hard time installing it, so I will describe the installation method.
Do the following in python2.7: (It didn't work with python3.)
$ git clone https://github.com/rmcantin/bayesopt
$ cd bayesopt
$ brew install cmake
$ cmake -DBAYESOPT_PYTHON_INTERFACE=ON .
$ ccmake .
and press "t" to select advanced features. Then, look if the PYTHON_* variables point to the same install/version. Press "t" to switch to advance mode and adjust the following parameters to suit your environment. (When using anaconda on mac, it looks like the following)
PYTHON_EXECUTABLE /Users/macuser/.pyenv/versions/miniconda3-3.9.1/envs/py27/bin/python
PYTHON_INCLUDE_DIR /Users/macuser/.pyenv/versions/miniconda3-3.9.1/envs/py27/include/python2.7
PYTHON_LIBRARY /Users/macuser/.pyenv/versions/miniconda3-3.9.1/envs/py27/lib/libpython2.7.dylib
$ make
$ sudo make install
params['crit_name'] = "cSum(cEI,cDistance)"
params['crit_params'] = [1, 0.5]
params['kernel_name'] = "kMaternISO3"
Is modified below and executed.
params['crit_name'] = "cMI"
#params['crit_params'] = [1, 0.5]
params['kernel_name'] = "kMaternISO5"
Recommended Posts