View source: R/rownormalize_tss.R
step_rownormalize_tss | R Documentation |
Normalize a set of variables by converting them to proportion, making them sum to 1. Also known as simplex projection.
step_rownormalize_tss(
recipe,
...,
role = NA,
trained = FALSE,
res = NULL,
skip = FALSE,
id = rand_id("rownormalize_tss")
)
## S3 method for class 'step_rownormalize_tss'
tidy(x, ...)
recipe |
A recipe object. The step will be added to the sequence of operations for this recipe. |
... |
One or more selector functions to choose variables
for this 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 |
This parameter is only produced after the recipe has been trained. |
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. |
x |
A |
An updated version of recipe with the new step added to the sequence of any existing operations.
Antoine Bichat
rec <-
recipe(Species ~ ., data = iris) %>%
step_rownormalize_tss(all_numeric_predictors()) %>%
prep()
rec
tidy(rec, 1)
bake(rec, new_data = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.