Extract a model-defined grid of tuning parameter values.
Usage
get_grid(x, ...)
# S3 method for default
get_grid(x, ..., model, size = 3, random = FALSE, info = FALSE)
# S3 method for formula
get_grid(x, data, ...)
# S3 method for matrix
get_grid(x, y, ...)
# S3 method for ModelFrame
get_grid(x, ...)
# S3 method for recipe
get_grid(x, ...)
# S3 method for MLModel
get_grid(x, ...)
# S3 method for MLModelFunction
get_grid(x, ...)
Arguments
x
optional input specifying a relationship between
model predictor and response variables. Alternatively, a
model function or call may be given first followed by the
input specification.
single integer or vector of integers whose positions or names
match the parameters in the model's tuning grid and which specify the
number of values to use in constructing the grid.
random
number of unique grid points to sample at random, Inf
for all random points, or FALSE for all fixed points.
info
logical indicating whether to return the grid construction
information rather than the grid values.
data
data frame containing observed predictors and
outcomes.
y
response variable.
Value
A data frame of parameter values or NULL if data are required
for construction of the grid but not supplied.
Details
The get_grid function enables manual extraction and viewing
of grids created automatically if TunedModel is called with a
Grid object.