Description Usage Arguments Details Value Author(s) See Also Examples
This function builds the grid for the grid search algorithm with a zoom.
1 |
... |
a sequence of vectors or lists containing the information about the grid to be built, see Usage and Details. |
The argument ...
is a sequence of vectors or lists contatining the information about the grid to be built.
Each element in the sequence is either a vector or a list taking one of the following forms
- x
, if x
is already an sequence of the grid points for the corresponding argument.
- c(from=, to=, by=)
- c(from=, to=, length=)
- list(from=, to=, by=)
- list(from=, to=, length=)
where
- from
: the min of the argument of the target function
- to
: the max of the argument of the target function
- by
: the increment of the sequence
- length
: desired length.
There are many different ways to organize the points on the grid for certain argument of the target function,
the user can make them freely and input directly by build_grid(x, ...)
.
Notice that x
does not need to be increasing, as the function will sort it.
The design that x
does not need to be increasing makes it convenient for the user
to interpolate more points at some region without considering to sort it all the time.
When by
is provided, the length
will be ignored.
So if the user wanna specify the length
, please do not use by
.
The order of the sequence ...
matters as it represents the order of the corresponding arguments of the target function to be optimized.
a new object of the class GRID with the grid ready for the grid search with a zoom.
The object contains the following components:
grid |
the grid |
size |
number of points in the grid |
npar |
number of arguments or parameters |
Yukai Yang, yukai.yang@statistik.uu.se
grid_search_check
, grid_search
1 2 | vx = 1:5
build_grid(vx, c(from=1, to=2, by=.2), list(from=3, to=4, length=5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.