expand_steps | R Documentation |
Create a grid of parameter values from all combinations of lists supplied for steps of a preprocessing recipe.
expand_steps(..., random = FALSE)
... |
one or more lists containing parameter values over which to create
the grid. For each list an argument name should be given as the |
random |
number of points to be randomly sampled from the parameter grid
or |
RecipeGrid
class object that inherits from data.frame
.
TunedInput
library(recipes)
data(Boston, package = "MASS")
rec <- recipe(medv ~ ., data = Boston) %>%
step_corr(all_numeric_predictors(), id = "corr") %>%
step_pca(all_numeric_predictors(), id = "pca")
expand_steps(
corr = list(threshold = c(0.8, 0.9),
method = c("pearson", "spearman")),
pca = list(num_comp = 1:3)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.