expand_model | R Documentation |
Expand a model over all combinations of a grid of tuning parameters.
expand_model(object, ..., random = FALSE)
object |
model function, function name, or object; or another object that can be coerced to a model. |
... |
named vectors or factors or a list of these containing the
parameter values over which to expand |
random |
number of points to be randomly sampled from the parameter grid
or |
list
of expanded models.
SelectedModel
## Requires prior installation of suggested package gbm to run
data(Boston, package = "MASS")
models <- expand_model(GBMModel, n.trees = c(50, 100),
interaction.depth = 1:2)
fit(medv ~ ., data = Boston, model = SelectedModel(models))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.