Learn R Programming

calibrar (version 0.2.0)

optimES: Optimization using Evolutionary Strategies

Description

This function performs the optimization of a function using evolutionary strategies, by default the AHR-ES (Oliveros & Shin, 2015).

Usage

optimES(par, fn, gr = NULL, ..., lower = -Inf, upper = Inf,
  active = NULL, control = list(), hessian = FALSE, method = "default")

Arguments

par

A numeric vector. The length of the par argument defines the number of parameters to be estimated (i.e. the dimension of the problem).

fn

The function to be minimized.

gr

the gradient of fn. Ignored, added for portability with other optimization functions.

lower

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

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).

active

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.

control

Parameter for the control of the algorithm itself, see details.

hessian

Logical. Should a numerically differentiated Hessian matrix be returned? Currently not implemented.

method

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.

Author

Ricardo Oliveros-Ramos

Examples

Run this code
optimES(par=rep(1, 5), fn=SphereN)

Run the code above in your browser using DataLab