- 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 recipes::selections()
for more details.
- role
For model terms created by this step, what analysis
role should they be assigned?. By default, the function assumes
that the new columns created by the original variables will be
used as predictors in a model.
- trained
A logical to indicate if the quantities for
preprocessing have been estimated.
- columns
A character string of variable names that will
be populated (eventually) by the terms
argument. This is NULL
until the step is trained by recipes::prep.recipe()
.
- sequence_length
A numeric, number of characters to keep before
discarding. Defaults to 100.
- padding
'pre' or 'post', pad either before or after each sequence.
defaults to 'pre'.
- truncating
'pre' or 'post', remove values from sequences larger than
sequence_length either in the beginning or in the end of the sequence.
Defaults too 'pre'.
- vocabulary
A character vector, characters to be mapped to integers.
Characters not in the vocabulary will be encoded as 0. Defaults to
letters
.
- prefix
A prefix for generated column names, default to "seq1hot".
- keep_original_cols
A logical to keep the original variables in the
output. Defaults to FALSE
.
- skip
A logical. Should the step be skipped when the
recipe is baked by recipes::bake.recipe()
? While all operations are baked
when recipes::prep.recipe()
is run, some operations may not be able to be
conducted on new data (e.g. processing the outcome variable(s)).
Care should be taken when using skip = FALSE
.
- id
A character string that is unique to this step to identify it.