DEoptim.control: Control various aspects of the DEoptim implementation

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

View source: R/DEoptim.R

Description

Allow the user to set some characteristics of the Differential Evolution optimization algorithm implemented in DEoptim.

Usage

1
2
3
4
DEoptim.control(VTR = -Inf, strategy = 2, bs = FALSE, NP = 50,
   itermax = 200, CR = 0.5, F = 0.8, trace = TRUE,
   initialpop = NULL, storepopfrom = itermax + 1,
   storepopfreq = 1, checkWinner = FALSE, avWinner = TRUE, p = 0.2)

Arguments

VTR

the value to be reached. The optimization process will stop if either the maximum number of iterations itermax is reached or the best parameter vector bestmem has found a value fn(bestmem) <= VTR. Default to -Inf.

strategy

defines the Differential Evolution strategy used in the optimization procedure:
1: DE / rand / 1 / bin (classical strategy)
2: DE / local-to-best / 1 / bin (default)
3: DE / best / 1 / bin with jitter
4: DE / rand / 1 / bin with per-vector-dither
5: DE / rand / 1 / bin with per-generation-dither
6: DE / current-to-p-best / 1
any value not above: variation to DE / rand / 1 / bin: either-or-algorithm. Default strategy is currently 2. See *Details*.

bs

if FALSE then every mutant will be tested against a member in the previous generation, and the best value will proceed into the next generation (this is standard trial vs. target selection). If TRUE then the old generation and NP mutants will be sorted by their associated objective function values, and the best NP vectors will proceed into the next generation (best of parent and child selection). Default is FALSE.

NP

number of population members. Defaults to 50. For many problems it is best to set NP to be at least 10 times the length of the parameter vector.

itermax

the maximum iteration (population generation) allowed. Default is 200.

CR

crossover probability from interval [0,1]. Default to 0.9.

F

step-size from interval [0,2]. Default to 0.8.

trace

Printing of progress occurs? Default to TRUE. If numeric, progress will be printed every trace iterations.

initialpop

an initial population used as a starting population in the optimization procedure. May be useful to speed up the convergence. Default to NULL. If given, each member of the initial population should be given as a row of a numeric matrix, so that initialpop is a matrix with NP rows and a number of columns equal to the length of the parameter vector to be optimized.

storepopfrom

from which generation should the following intermediate populations be stored in memory. Default to itermax + 1, i.e., no intermediate population is stored.

storepopfreq

the frequency with which populations are stored. Default to 1, i.e., every intermediate population is stored.

checkWinner

logical value indicating whether to re-evaluate the objective function using the winning parameter vector if this vector remains the same between generations. This may be useful for the optimization of a noisy objective function. If checkWinner = TRUE and avWinner = FALSE then the value associated with re-evaluation of the objective function is used in the next generation. Default to FALSE.

avWinner

logical value. If checkWinner = TRUE and avWinner = TRUE then the objective function value associated with the winning member represents the average of all evaluations of the objective function over the course of the ‘winning streak’ of the best population member. This option may be useful for optimization of noisy objective functions, and is interpreted only if checkWinner = TRUE. The default value is TRUE.

p

when strategy = 6, the top (100 * p)% best solutions are used in the mutation. p must be defined in (0,1].

Details

This defines the Differential Evolution strategy used in the optimization procedure, described below in the terms used by Price et al. (2006); see also Mullen et al. (2009) for details.

Value

The default value of control is the return value of DEoptim.control(), which is a list (and a member of the S3 class DEoptim.control) with the above elements.

Note

Further details and examples of the R package DEoptim can be found in Mullen et al. (2009) and Ardia et al. (2010).

Please cite the package in publications.

Author(s)

For RcppDE: Dirk Eddelbuettel.

For DEoptim: David Ardia, Katharine Mullen katharine.mullen@nist.gov, Brian Peterson and Joshua Ulrich.

References

Price, K.V., Storn, R.M., Lampinen J.A. (2006) Differential Evolution - A Practical Approach to Global Optimization. Berlin Heidelberg: Springer-Verlag. ISBN 3540209506.

Mullen, K.M., Ardia, D., Gil, D.L, Windover, D., Cline, J. (2009) DEoptim: An R Package for Global Optimization by Differential Evolution. URL http://ssrn.com/abstract=1526466

Ardia, D., Boudt, K., Carl, P., Mullen, K.M., Peterson, B.G. (2010) Differential Evolution (DEoptim) for Non-Convex Portfolio Optimization. URL http://ssrn.com/abstract=1584905

See Also

DEoptim and DEoptim-methods.

Examples

1
2
3
4
5
6
## set the population size to 20
DEoptim.control(NP = 20)

## set the population size, the number of iterations and don't
## display the iterations during optimization
DEoptim.control(NP = 20, itermax = 100, trace = FALSE)

Example output

Now loading:
  RcppDE: C++ Implementation of Differential Evolution Optimisation
  Author: Dirk Eddelbuettel
Based on:
  DEoptim (version 2.0-7): Differential Evolution algorithm in R
  Authors: David Ardia, Katharine Mullen, Brian Peterson and Joshua Ulrich
$VTR
[1] -Inf

$strategy
[1] 2

$NP
[1] 20

$itermax
[1] 200

$CR
[1] 0.5

$F
[1] 0.8

$bs
[1] FALSE

$trace
[1] TRUE

$initialpop
NULL

$storepopfrom
[1] 201

$storepopfreq
[1] 1

$p
[1] 0.2

$c
[1] 0

$reltol
[1] 1.490116e-08

$steptol
[1] 200

$VTR
[1] -Inf

$strategy
[1] 2

$NP
[1] 20

$itermax
[1] 100

$CR
[1] 0.5

$F
[1] 0.8

$bs
[1] FALSE

$trace
[1] FALSE

$initialpop
NULL

$storepopfrom
[1] 101

$storepopfreq
[1] 1

$p
[1] 0.2

$c
[1] 0

$reltol
[1] 1.490116e-08

$steptol
[1] 100

RcppDE documentation built on May 2, 2019, 5 p.m.