Description Usage Arguments Details Value Author(s) See Also
View source: R/fmin.gridsearch.R
Evaluate an unconstrained cost function on a grid of points around a given initial point estimate.
1 2 | fmin.gridsearch(fun = NULL, x0 = NULL, xmin = NULL,
xmax = NULL, npts = 3, alpha = 10)
|
fun |
An unconstrained cost function returning a numeric scalar, similar
to those used in the |
x0 |
The initial point estimate, provided as a numeric vector. |
xmin |
Optional: a vector of lower bounds. |
xmax |
Optional: a vector of upper bounds. |
npts |
An integer scalar greater than 2, indicating the number of evaluation points will be used on each dimension to build the search grid. |
alpha |
A vector of numbers greater than 1, which give the factor(s) used
to calculate the evaluation range of each dimension of the search grid (see
Details). If |
fmin.gridsearch
evaluates the cost function at each point
of a grid of npts^length(x0)
points. If lower (xmin
) and upper
(xmax
) bounds are provided, the range of evaluation points is limited
by those bounds and alpha
is not used. Otherwise, the range of
evaluation points is defined as [x0/alpha,x0*alpha]
.
The actual evaluation of the cost function is delegated to
optimbase.gridsearch
.
Return a data.frame with the coordinates of the evaluation point, the value of the cost function and its feasibility. Because the cost function is unconstrained, it is always feasible. The data.frame is ordered by feasibility and increasing value of the cost function.
Sebastien Bihorel (sb.pmlab@gmail.com)
fminsearch
,
optimbase.gridsearch
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.