fmin.gridsearch: Grid evaluation of an unconstrained cost function

View source: R/fmin.gridsearch.R

fmin.gridsearchR Documentation

Grid evaluation of an unconstrained cost function

Description

Evaluate an unconstrained cost function on a grid of points around a given initial point estimate.

Usage

  fmin.gridsearch(fun = NULL, x0 = NULL, xmin = NULL, 
                  xmax = NULL, npts = 3, alpha = 10)

Arguments

fun

An unconstrained cost function returning a numeric scalar, similar to those used in the fminsearch function.

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 alpha length is lower than that of x0, elements of alpha are recycled. If its length is higher than that of x0, alpha is truncated.

Details

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.

Value

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.

Author(s)

Sebastien Bihorel (sb.pmlab@gmail.com)

See Also

fminsearch, optimbase.gridsearch


neldermead documentation built on March 18, 2022, 7:58 p.m.