cma.es: Covariance matrix adapting evolutionary strategy

Description Usage Arguments Details Value Author(s) Source References See Also Examples

Description

Global optimization procedure using a covariance matrix adapting evolutionary strategy.

Usage

1
  cma.es(par, fn, ..., lower, upper, control = list())

Arguments

par

Initial values for the parameters to be optimized over.

fn

A function to be minimized (or maximized), with first argument the vector of parameters over which minimization is to take place. It should return a scalar result.

...

Further arguments to be passed to fn.

lower, upper

Bounds on the variables.

control

A list of control parameters. See ‘Details’.

Details

Note that arguments after ... must be matched exactly. By default this function performs minimization, but it will maximize if control$fnscale is negative. It tries to be a drop in replacement for optim.

The control argument is a list that can supply any of the following components:

fnscale

An overall scaling to be applied to the value of fn during optimization. If negative, turns the problem into a maximization problem. Optimization is performed on fn(par)/fnscale.

maxit

The maximum number of iterations. Defaults to 100*D^2, where D is the dimension of the parameter space.

stopfitness

Stop if function value is smaller than or equal to stopfitness. This is the only way for the CMA-ES to "converge".

sigma

Inital variance estimates. Can be a single number or a vector of length D, where D is the dimension of the parameter space.

weights

Recombination weights

damps

Damping for step-size

cs

Cumulation constant for step-size

ccum

Cumulation constant for covariance matrix

|ccov.1Learning rate for rank-one update \itemccov.muLearning rate for rank-mu update

Value

A list with components:

par

The best set of parameters found.

value

The value of fn corresponding to par.

counts

A two-element integer vector giving the number of calls to fn. The second element is always zero for call compatibility with optim.

convergence

An integer code. 0 indicates successful convergence. Error codes are

1

indicates that the iteration limit maxit had been reached.

message

Always set to NULL, provided for call compatibility with optim.

Author(s)

Olaf Mersmann olafm@statistik.tu-dortmund.de

Source

The code is based on the ‘purecmaes.m’ by N. Hansen.

References

Hansen, N. (2006). The CMA Evolution Strategy: A Comparing Review. In J.A. Lozano, P. Larranga, I. Inza and E. Bengoetxea (eds.). Towards a new evolutionary computation. Advances in estimation of distribution algorithms. pp. 75-102, Springer;

See Also

See Also optim for traditional optimization methods.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Compare performance of different algorithms on the shifted Rosenbrock function:

## Test dimension
n <- 10

## Random optimum in [-50, 50]^n
opt <- runif(n, -50, 50)
bias <- 0
f <- genShiftedRosenbrock(opt, bias)

## Inital parameter values
start <- runif(n, -100, 100)

res.nm <- optim(start, f, method="Nelder-Mead")
res.gd <- optim(start, f, method="BFGS")
res.cg <- optim(start, f, method="CG")
res.sa <- optim(start, f, method="SANN")
res.es <- cma.es(start, f)

cmaes documentation built on May 2, 2019, 6:53 p.m.

Related to cma.es in cmaes...