cmaes: Covariance-Matrix-Adaptation

Description Usage Arguments Details Value Note References Examples

Description

Performs non-linear, non-convex optimization by means of the Covariance Matrix Adaptation - Evolution Strategy (CMA-ES).

Usage

1
2
cmaes(objective.fun, start.point = NULL, monitor = makeSimpleMonitor(),
  control = list(stop.ons = c(getDefaultStoppingConditions())))

Arguments

objective.fun

[smoof_function]
Continuous objective function of type smoof_function. The function must expect a vector of numerical values and return a scaler numerical value.

start.point

[numeric]
Initial solution vector. If NULL, one is generated randomly within the box constraints offered by the paramter set of the objective function. Default is NULL.

monitor

[cma_monitor]
Monitoring object. Default is makeSimpleMonitor, which produces a console output.

control

[list]
Futher paramters for the CMA-ES. See the details section for more in-depth information. Stopping conditions are also defined here. By default only some stopping conditions are passed. See getDefaultStoppingConditions.

Details

This is a pure R implementation of the popular CMA-ES optimizer for continuous black box optimization [2, 3]. It features a flexible system of stopping conditions and enables restarts [1], which can be triggered by arbitrary stopping conditions and can lead to superior performance on multimodal problems.

You may pass additional parameters to the CMA-ES via the control argument. This argument must be a named list. The following control elements will be considered by the CMA-ES implementation:

lambda [integer(1)]

Number of offspring generated in each generation.

mu [integer(1)]

Number of individuals in each population. Defaults to \lfloor λ / 2\rfloor.

weights [numeric]

Numeric vector of positive weights.

sigma [numeric(1)]

Initial step-size. Default is 0.5.

restart.triggers [character]

List of stopping condition codes / short names (see makeStoppingCondition). All stopping conditions which are placed in this vector do trigger a restart instead of leaving the main loop. Default is the empty character vector, i.e., restart is not triggered.

max.restarts [integer(1)]

Maximal number of restarts. Default is 0. If set to >= 1, the CMA-ES is restarted with a higher population size if at least one of the stoppping conditions is defined as a restart trigger restart.triggers.

restart.multiplier [numeric(1)]

Factor which is used to increase the population size after restart. Default is 2.

stop.ons [list]

List of stopping conditions. The default is to stop after 10 iterations or after a kind of a stagnation (see getDefaultStoppingConditions).

log.population [logical(1L)]

Should each population be stored? Default is FALSE.

Value

[cma_result] Result object. Internally a list with the following components:

par.set [ParamSet]

Parameter set of the objective function.

best.param [numeric]

Final best parameter setting.

best.fitness [numeric(1L)]

Fitness value of the best.param

.

n.evals [integer(1L)]

Number of function evaluations performed.

past.time [integer(1L)]

Running time of the optimization in seconds.

n.restarts [integer(1L)]

Number of restarts.

population.trace [list]

Trace of population.

message [character(1L)]

Message generated by stopping condition.

Note

Internally a check for an indefinite covariance matrix is always performed, i.e., this stopping condition is always prepended internally to the list of stopping conditions.

References

[1] Auger and Hansen (2005). A Restart CMA Evolution Strategy With Increasing Population Size. In IEEE Congress on Evolutionary Computation, CEC 2005, Proceedings, pp. 1769-1776. [2] N. Hansen (2006). The CMA Evolution Strategy: A Comparing Review. In J.A. Lozano, P. Larranaga, I. Inza and E. Bengoetxea (Eds.). Towards a new evolutionary computation. Advances in estimation of distribution algorithms. Springer, pp. 75-102. [3] Hansen and Ostermeier (1996). Adapting arbitrary normal mutation distributions in evolution strategies: The covariance matrix adaptation. In Proceedings of the 1996 IEEE International Conference on Evolutionary Computation, pp. 312-317.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# generate objective function from smoof package
fn = makeRosenbrockFunction(dimensions = 2L)
res = cmaes(
  fn,
  monitor = NULL,
  control = list(
    sigma = 1.5,
    lambda = 40,
    stop.ons = c(list(stopOnMaxIters(100L)), getDefaultStoppingConditions())
  )
)
print(res)

jakobbossek/cmaesr documentation built on May 18, 2019, 9:09 a.m.