[PYTHON] How to install BayesOpt

1. Bayesian optimization

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.

2. BayesOpt installation

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
  1. Operation check Since there is a test script demo_distance.py under python in the cloned directory
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

How to install BayesOpt
How to install Python
How to install python
How to install Nbextensions
How to install Prover9
[2020.8 latest] How to install Python
How to install Python [Windows]
Tabpy 1.0 (2020-01 version) How to install
How to install mkl numpy
How to install Pelican blog
How to install mysql-connector-python on mac
How to install python-pip with ubuntu20.04LTS
How to install graph-tool on macOS
How to install wkhtmltopdf (Amazon Linux2)
How to install VMware-Tools on Linux
How to install pycrypto on Windows
How to install OpenCV on Mac
How to install MBDyn (Linux Ubuntu)
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
How to install and configure blackbird
How to install CUDA and nvidia-driver
How to install and use Graphviz
How to install mysql-connector with pip3
How to install Maven on CentOS
How to install Go on Ubuntu
How to install music 21 on windows
How to install Anaconda with pyenv
How to install aws-session-manager-plugin on Manajro Linux
How to install drobertadams / toggl-cli on Mac
How to install and use pandas_datareader [Python]
python3 How to install an external module
How to install CatBoost [as of January 2020]
How to install DLIB with 2020 / CUDA enabled
How to install a package using a repository
How to install packages on Alpine Linux
How to install Anisble on Amazon Linux 2
How to install richzhang / colorization on Windows 10
How to install your own (root) CA
How to install Windows Subsystem For Linux
How to install Apache (httpd) on CentOS7
How to install php7.4 on Linux (Ubuntu)
How to install Eclipse GlassFish 5.1.0 on CentOS 7
How to install Apache (httpd) on CentOS8
How to install zsh (with .zshrc customization)
How to install NumPy on Raspberry Pi
How to install fabric and basic usage
How to install cx_Oracle on macOS Sierra
How to install python3 with docker centos
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
How to use virtualenv
Scraping 2 How to scrape
How to use Seaboan
How to use image-match
[2020 version] How to install Python3 on AWS EC2
How to use Pandas 2
How to read PyPI
How to install OpenCV on Jetson Nano Python
How to use Virtualenv