Learn R Programming

MachineShop (version 2.8.0)

ParameterGrid: Tuning Parameters Grid

Description

Defines a tuning grid from a set of parameters.

Usage

ParameterGrid(...)

# S3 method for param ParameterGrid(..., size = 3, random = FALSE, length = NULL)

# S3 method for list ParameterGrid(x, size = 3, random = FALSE, length = NULL, ...)

# S3 method for parameters ParameterGrid(x, size = 3, random = FALSE, length = NULL, ...)

Arguments

...

named param objects as defined in the dials package.

size

single integer or vector of integers whose positions or names match the given parameters and which specify the number of values to use in constructing a regular grid if random = FALSE; ignored otherwise.

random

number of unique grid points to sample at random or FALSE for all points from a regular grid defined by size.

length

deprecated argument; use size instead.

x

list of named param objects or a parameters object.

Value

ParameterGrid class object that inherits from parameters and Grid.

See Also

TunedModel

Examples

Run this code
# NOT RUN {
## GBMModel tuning parameters
grid <- ParameterGrid(
  n.trees = dials::trees(),
  interaction.depth = dials::tree_depth(),
  random = 5
)
TunedModel(GBMModel, grid = grid)

# }

Run the code above in your browser using DataLab