- recipe
recipe object to which the step will be added.
- ...
one or more selector functions to choose which variables will be
used to compute the components. See selections
for
more details. These are not currently used by the tidy
method.
- num_comp
number of components to derive. The value of num_comp
will be constrained to a minimum of 1 and maximum of the number of original
variables when prep
is run.
- sparsity, num_var
sparsity (L1 norm) penalty for each component or
number of variables with non-zero component loadings. Larger sparsity
values produce more zero loadings. Argument sparsity
is ignored if
num_var
is given. The argument value may be a single number
applied to all components or a vector of component-specific numbers.
- shrinkage
numeric shrinkage (quadratic) penalty for the components to
improve conditioning; larger values produce more shrinkage of component
loadings toward zero.
- center, scale
logicals indicating whether to mean center and standard
deviation scale the original variables prior to deriving components, or
functions or names of functions for the centering and scaling.
- max_iter
maximum number of algorithm iterations allowed.
- tol
numeric tolerance for the convergence criterion.
- replace
logical indicating whether to replace the original variables.
- prefix
character string prefix added to a sequence of zero-padded
integers to generate names for the resulting new variables.
- role
analysis role that added step variables should be assigned. By
default, they are designated as model predictors.
- skip
logical indicating whether to skip the step when the recipe is
baked. While all operations are baked when prep
is
run, some operations may not be applicable to new data (e.g. processing
outcome variables). Care should be taken when using skip = TRUE
as
it may affect the computations for subsequent operations.
- id
unique character string to identify the step.
- x
step_spca
object.