Learn R Programming

MachineShop (version 1.6.0)

expand_model: Model Expansion Over Tuning Parameters

Description

Expand a model over all combinations of a grid of tuning parameters.

Usage

expand_model(x, ...)

Arguments

x

model function, function name, or call.

...

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

Value

MLModelList class object that inherits from list.

See Also

tune

Examples

Run this code
# NOT RUN {
library(MASS)

models <- expand_model(GBMModel, n.trees = c(50, 100),
                                 interaction.depth = 1:2)

fit(medv ~ ., data = Boston, model = SelectedModel(models))

# }

Run the code above in your browser using DataLab