Learn R Programming

MachineShop (version 3.3.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)

# S3 method for list ParameterGrid(object, size = 3, random = FALSE, ...)

# S3 method for parameters ParameterGrid(object, size = 3, random = FALSE, ...)

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 used to construct the grid.

random

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

object

list of named param objects or a parameters object. This is a positional argument that must be given first in calls to its methods.

Value

ParameterGrid class object that inherits from parameters and TuningGrid.

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