-
Notifications
You must be signed in to change notification settings - Fork 78
using CMA ES in CERN's ROOT
This is support for black-box optimization with CMA-ES from within ROOT (http://root.cern.ch/drupal/).
This is a work in progress, support for ROOT is under continuous improvement
libcmaes can be used from CERN's ROOT6 as a replacement or addition to Minuit2 optimizer. It is designed to be used from ROOT6 exactly as Minuit2 is used, so code using Minuit2 should be easily run against CMA-ES.
Note: at this early stage, not all features of Minuit2, such as subroutines Minos and Contour, are ported to CMA-ES. This is a work in progress.
Below are instructions for testing it out.
Beware: at the moment support is alpha, this is NO production code
As for now, the only way to use libcmaes is from ROOT6, using the following special repository, and compiling it from sources (1): https://github.com/beniz/root/tree/cmaes4root_master
Proceed with the following steps:
- get and install libcmaes into your home repository (or globally on your system, remove the --prefix option to the configure script below):
./configure --prefix=/home/yourhome
make
make install
- get ROOT6 from https://github.com/beniz/root/tree/cmaes4root_master, configure & compile it (this will take a while) (2):
git clone https://github.com/beniz/root/tree/cmaes4root_master
cd root
./configure --enable-minuit2 --build=debug
make
use make -jx where x is the number of cores on your system in order to minimize the building time.
To run the basic fitting of a Gaussian, originally taken from Minuit2's tutorial files, do:
root
.L tutorials/fit/cmaesGausFit.C++g
cmaesGausFit()
You should see a plot similar to
(1) more convenient ways will be provided. (2) we recommend building support for both minuit2 (i.e. for comparison to CMA-ES) and debug.