DEoptim.control {DEoptim} | R Documentation |
Control various aspects of the DEoptim implementation
Description
Allow the user to set some characteristics of the
Differential Evolution optimization algorithm implemented
in DEoptim
.
Usage
DEoptim.control(VTR = -Inf, strategy = 2, bs = FALSE, NP = NA,
itermax = 200, CR = 0.5, F = 0.8, trace = TRUE, initialpop = NULL,
storepopfrom = itermax + 1, storepopfreq = 1, p = 0.2, c = 0, reltol,
steptol, parallelType = c("none", "auto", "parallel", "foreach"),
cluster = NULL, packages = c(), parVar = c(),
foreachArgs = list(), parallelArgs = NULL)
Arguments
VTR |
the value to be reached. The optimization process
will stop if either the maximum number of iterations |
strategy |
defines the Differential Evolution
strategy used in the optimization procedure: |
bs |
if |
NP |
number of population members. Defaults to |
itermax |
the maximum iteration (population generation) allowed.
Default is |
CR |
crossover probability from interval [0,1]. Default
to |
F |
differential weighting factor from interval [0,2]. Default
to |
trace |
Positive integer or logical value indicating whether
printing of progress occurs at each iteration. The default value is
|
initialpop |
an initial population used as a starting
population in the optimization procedure. May be useful to speed up
the convergence. Default to |
storepopfrom |
from which generation should the following
intermediate populations be stored in memory. Default to
|
storepopfreq |
the frequency with which populations are stored.
Default to |
p |
when |
c |
|
reltol |
relative convergence tolerance. The algorithm stops if
it is unable to reduce the value by a factor of |
steptol |
see |
parallelType |
Defines the type of parallelization to employ, if
any.
|
cluster |
Existing parallel cluster object. If provided, overrides
+ specified |
packages |
Used if |
parVar |
Used if |
foreachArgs |
A list of named arguments for the |
parallelArgs |
A list of named arguments for the parallel engine.
For package foreach, the argument |
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.
-
strategy = 1
: DE / rand / 1 / bin.
This strategy is the classical approach for DE, and is described inDEoptim
. -
strategy = 2
: DE / local-to-best / 1 / bin.
In place of the classical DE mutation the expressionv_{i,g} = old_{i,g} + (best_{g} - old_{i,g}) + x_{r0,g} + F \cdot (x_{r1,g} - x_{r2,g})
is used, where
old_{i,g}
andbest_{g}
are thei
-th member and best member, respectively, of the previous population. This strategy is currently used by default. -
strategy = 3
: DE / best / 1 / bin with jitter.
In place of the classical DE mutation the expressionv_{i,g} = best_{g} + jitter + F \cdot (x_{r1,g} - x_{r2,g})
is used, where
jitter
is defined as 0.0001 *rand
+ F. -
strategy = 4
: DE / rand / 1 / bin with per vector dither.
In place of the classical DE mutation the expressionv_{i,g} = x_{r0,g} + dither \cdot (x_{r1,g} - x_{r2,g})
is used, where
dither
is calculated asF + \code{rand} * (1 - F)
. -
strategy = 5
: DE / rand / 1 / bin with per generation dither.
The strategy described for4
is used, butdither
is only determined once per-generation. -
strategy = 6
: DE / current-to-p-best / 1.
The top(100*p)
percent best solutions are used in the mutation, wherep
is defined in(0,1]
. any value not above: variation to DE / rand / 1 / bin: either-or algorithm.
In the case thatrand
< 0.5, the classical strategystrategy = 1
is used. Otherwise, the expressionv_{i,g} = x_{r0,g} + 0.5 \cdot (F + 1) \cdot (x_{r1,g} + x_{r2,g} - 2 \cdot x_{r0,g})
is used.
Several conditions can cause the optimization process to stop:
if the best parameter vector (
bestmem
) produces a value less than or equal toVTR
(i.e.fn(bestmem) <= VTR
), orif the maximum number of iterations is reached (
itermax
), orif a number (
steptol
) of consecutive iterations are unable to reduce the best function value by a certain amount (reltol * (abs(val) + reltol)
).100*reltol
is approximately the percent change of the objective value required to consider the parameter set an improvement over the current best member.
Zhang and Sanderson (2009) define several extensions to the DE algorithm,
including strategy 6, DE/current-to-p-best/1. They also define a self-adaptive
mechanism for the other control parameters. This self-adaptation will speed
convergence on many problems, and is defined by the control parameter c
.
If c
is non-zero, crossover and mutation will be adapted by the algorithm.
Values in the range of c=.05
to c=.5
appear to work best for most
problems, though the adaptive algorithm is robust to a wide range of c
.
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. (2011) and Ardia et al. (2011a, 2011b) or look at the
package's vignette by typing vignette("DEoptim")
. Also, an illustration of
the package usage for a high-dimensional non-linear portfolio optimization problem
is available by typing vignette("DEoptimPortfolioOptimization")
.
Please cite the package in publications. Use citation("DEoptim")
.
Author(s)
David Ardia, Katharine Mullen mullenkate@gmail.com, Brian Peterson and Joshua Ulrich.
References
Ardia, D., Boudt, K., Carl, P., Mullen, K.M., Peterson, B.G. (2011) Differential Evolution with DEoptim. An Application to Non-Convex Portfolio Optimization. R Journal, 3(1), 27-34. doi:10.32614/RJ-2011-005
Ardia, D., Ospina Arango, J.D., Giraldo Gomez, N.D. (2011) Jump-Diffusion Calibration using Differential Evolution. Wilmott Magazine, 55 (September), 76-79. doi:10.1002/wilm.10034
Mullen, K.M, Ardia, D., Gil, D., Windover, D., Cline,J. (2011). DEoptim: An R Package for Global Optimization by Differential Evolution. Journal of Statistical Software, 40(6), 1-26. doi:10.18637/jss.v040.i06
Price, K.V., Storn, R.M., Lampinen J.A. (2006) Differential Evolution - A Practical Approach to Global Optimization. Berlin Heidelberg: Springer-Verlag. ISBN 3540209506.
Zhang, J. and Sanderson, A. (2009) Adaptive Differential Evolution Springer-Verlag. ISBN 978-3-642-01526-7
See Also
DEoptim
and DEoptim-methods
.
Examples
## 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)