step_discretize {recipes} | R Documentation |
step_discretize
creates a a specification of a recipe
step that will convert numeric data into a factor with
bins having approximately the same number of data points (based
on a training set).
step_discretize(recipe, ..., role = NA, trained = FALSE, objects = NULL, options = list(), skip = FALSE, id = rand_id("discretize")) ## S3 method for class 'step_discretize' tidy(x, ...)
recipe |
A recipe object. The step will be added to the sequence of operations for this recipe. |
... |
For |
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. |
objects |
The |
options |
A list of options to |
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 |
step_discretize
returns 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 selectors or variables selected)
and value
(the breaks).