Given an objective function and starting ranges, computes the values over the ranges and displays them in the graphics window. User can then interactively zoom in to view interesting parts of the surface.
gridsearch2d(fun, v1min, v2min, v1max, v2max,
n1 = 20, n2 = 20, logz = FALSE,
sys3d = c("both", "contour", "image"), ...)
If a final point is chosen, a list with elements x
and
y
,
otherwise NULL.
Objective function to be minimized: function of two arguments
Minimum starting value of variable 1
Minimum starting value of variable 2
Maximum starting value of variable 1
Maximum starting value of variable 2
Number of grid points for variable 1
Number of grid points for variable 2
Display image or contour on log scale?
Display surface as an image, contour, or both?
Other arguments to fun
Ben Bolker
If log=TRUE
, the value of the surface is rescaled to
log10(m-min(m)+mindm)
, where mindm
is the
difference between the minimum and the next-largest value
(or 1e-10 if this difference is zero).
At each iteration, the user is prompted to select two corners of the new range with the mouse; if this choice is confirmed then the view zooms in. When the user chooses to quit, they are asked whether they want to choose a final point (e.g. an estimate of the minimum) with the mouse.
curve3d