Learn R Programming

MachineShop (version 1.6.0)

expand_params: Model Parameters Expansion

Description

Create a grid of parameter values from all combinations of supplied inputs.

Usage

expand_params(...)

Arguments

...

named vectors or factors or a list of these containing the parameter values over which to create the grid.

Value

A data frame containing one row for each combination of the supplied inputs.

See Also

tune, TunedModel

Examples

Run this code
# NOT RUN {
library(MASS)

grid <- expand_params(
  n.trees = c(50, 100),
  interaction.depth = 1:2
)

fit(medv ~ ., data = Boston, model = TunedModel(GBMModel, grid = grid))

# }

Run the code above in your browser using DataLab