GitXplorerGitXplorer
a

Rlibcmaes

public
2 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
264594d5637194d840b7d55e2bbc19f383b656bb

Fix rcpp help issue

aandrewsali committed 7 years ago
Unverified
fde590a4619dd0ee52a67566c999cc01c5546176

adding test and demo functions

aandrewsali committed 8 years ago
Unverified
42c64d05a2afb567f3351d46cb7bedfc4d5fcb02

renamed files for testing

aandrewsali committed 8 years ago
Unverified
049b17f2f4fb890030907e3e481537bbf43de915

Bringing cran-comments up to date

aandrewsali committed 8 years ago
Unverified
c68b694e7ee09e6dd44cd3df53bd59655b897f4a

Addig cran comments

aandrewsali committed 8 years ago
Unverified
e6bfcb2736fcda1d467cef78f589609db9b3e2e1

Merge branch 'master' of https://github.com/andrewsali/Rlibcmaes

aandrewsali committed 8 years ago

README

The README file for this repository.

Rlibcmaes

This is a lightweight R wrapper on the libcmaes C++ library (https://github.com/beniz/libcmaes/). Currently it supports box-constrained optimization only. The aim is to have a simple & familiar R optimization interface that suffices for most applications, with the ability to tune the parameters of the algorithm if necessary.

For expensive objective functions, parallel evaluations is made available by specifying a parallel cluster. Due to the R interpreter being non thread-safe, parallelization is not based on the openMPI calls of libcmaes, but is handled directly through the R parallel package. It should be considered for expensive objective functions only or large population sizes.

All of the libcmaes implemented algorithms are available for selection, as well as population size control & termination based on maximum function evaluations / x-convergence / function-convergence.

Available algorithms are listed in: https://github.com/andrewsali/Rlibcmaes/blob/master/R/cmaEsAlgo.R

Default parameter values are given in: https://github.com/andrewsali/Rlibcmaes/blob/master/R/cmaEsParams.R

Installation

The libcmaes library requires C++11, therefore currently the package only works under UNIX variants. This will change with R 3.3., which is going to use gcc 4.9+. The package has been tested under experimental Windows builds, so it is highly likely that it will be available for Windows platforms in the near future.

As a first step make sure RcppEigen package is installed. Then to install the package, clone the git repository to a folder and then execute R CMD INSTALL (for example):

git clone --recursive https://github.com/andrewsali/Rlibcmaes.git /tmp/Rlibcmaes
cd /tmp
R CMD INSTALL --preclean Rlibcmaes

Unfortunately install_github from the devtools package does not support submodules at this point (recursive cloning), therefore one needs to manually clone the repository and install.

Example / Testing

A quick-test of the package can be run by executing the contents of https://github.com/andrewsali/Rlibcmaes/blob/master/tests/testthat/quadratic_test.R

Modifications to libcmaes

For the set of modifications applied to libcmaes src, see the fork of the libcmaes library that the src/ folder is based on: https://github.com/andrewsali/libcmaes/tree/RLibDiff

Authors

The R wrapper has been created by Andras Sali. All credit for the underlying library goes to libcmaes developers.

Development support has been provided by the Alphacruncher Team (http://alphacruncher.com/).