Description Usage Arguments Details Author(s) Examples
View source: R/calibraR-main.R
This function performs the optimization of a function, possibly
in sequential phases of increasing complexity, and it is designed for the
calibration of a model, by minimizing the error function fn
associated to it.
1 2 3 |
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 |
method |
The optimization method to be used. The 'default' method is the AHR-ES (Oliveros & Shin, 2016). All the methods from stats::optim, optimx::optimx and cmaes::cma_es are available. |
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. |
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. |
control |
Parameter for the control of the algorithm itself, see details. |
hessian |
Logical. Should a numerically differentiated Hessian matrix be returned? Currently not implemented. |
phases |
An optional vector of the same length as |
replicates |
The number of replicates for the evaluation of |
... |
Additional parameters to be passed to |
In the control list, aggFn
is a function to aggregate fn
to
a scalar value if the returned value is a vector. Some optimization algorithm can
exploite the additional information provided by a vectorial output from fn
.
Ricardo Oliveros-Ramos
1 2 3 4 5 6 7 8 | calibrate(par=rep(NA, 5), fn=SphereN)
## Not run:
calibrate(par=rep(NA, 5), fn=SphereN, replicates=3)
calibrate(par=rep(0.5, 5), fn=SphereN, replicates=3, lower=-5, upper=5)
calibrate(par=rep(0.5, 5), fn=SphereN, replicates=3, lower=-5, upper=5, phases=c(1,1,1,2,3))
calibrate(par=rep(0.5, 5), fn=SphereN, replicates=c(1,1,4), lower=-5, upper=5, phases=c(1,1,1,2,3))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.