This function performs the optimization of a function using evolutionary strategies, by default the AHR-ES (Oliveros & Shin, 2015).
optimES(par, fn, gr = NULL, ..., lower = -Inf, upper = Inf,
active = NULL, control = list(), hessian = FALSE, method = "default")
A numeric vector. The length of the par argument defines the number of parameters to be estimated (i.e. the dimension of the problem).
The function to be minimized.
the gradient of fn
. Ignored, added for portability with
other optimization functions.
Lower threshold value(s) for parameters. One value or a vector
of the same length as par. If one value is provided, it is used for all
parameters. NA
means -Inf
. By default -Inf
is used (unconstrained).
Upper threshold value(s) for parameters. One value or a vector
of the same length as par. If one value is provided, it is used for all
parameters. NA
means Inf
. By default Inf
is used (unconstrained).
A boolean vector of the same length of par
. If TRUE
, the
parameter is optimized, if FALSE
the parameter is fixed to the value specified
in par
.
Parameter for the control of the algorithm itself, see details.
Logical. Should a numerically differentiated Hessian matrix be returned? Currently not implemented.
The optimization method to be used. Currently, the only implemented is the 'default' method, corresponding to the AHR-ES (Oliveros & Shin, 2015).
Additional parameters to be passed to fn
.
Ricardo Oliveros-Ramos
optimES(par=rep(1, 5), fn=SphereN)
Run the code above in your browser using DataLab