step_minmax | R Documentation |
step_minmax()
creates a specification of a recipe step that will perform
Min Max scaling.
step_minmax(
recipe,
...,
role = NA,
trained = FALSE,
res = NULL,
columns = NULL,
skip = FALSE,
id = rand_id("minmax")
)
recipe |
A recipe object. The step will be added to the sequence of operations for this recipe. |
... |
One or more selector functions to choose which variables are
affected by the step. See |
role |
Not used by this step since no new variables are created. |
trained |
A logical to indicate if the quantities for preprocessing have been estimated. |
res |
A list containing min and max of training variables is stored here
once this preprocessing step has be trained by |
columns |
A character string of variable names that will be populated
(eventually) by the |
skip |
A logical. Should the step be skipped when the
recipe is baked by |
id |
A character string that is unique to this step to identify it. |
An updated version of recipe
with the new step added to the
sequence of existing steps (if any). For the tidy
method, a tibble with
columns terms
(the columns that will be affected) and base
.
library(recipes)
rec <- recipe(~., data = mtcars) %>%
step_minmax(all_predictors()) %>%
prep()
rec %>%
bake(new_data = NULL)
tidy(rec, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.