fmin.gridsearch function

Grid evaluation of an unconstrained cost function

Grid evaluation of an unconstrained cost function

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

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.

Returns

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

  • Maintainer: Sebastien Bihorel
  • License: CeCILL-2
  • Last published: 2022-02-01

Useful links