Convenience alias for genpls(); computes canonical generalized PLS
(PLS-SVD/GPLSSVD). See ?genpls for full documentation.
Usage
genplsc(
X,
Y,
Ax = NULL,
Ay = NULL,
Mx = NULL,
My = NULL,
ncomp = 2,
preproc_x = multivarious::pass(),
preproc_y = multivarious::pass(),
svd_backend = c("eigencore", "irlba", "RSpectra"),
svd_opts = list(tol = 1e-07, maxitr = 1000),
constraints_remedy = c("error", "ridge", "clip", "identity"),
verbose = FALSE
)Arguments
- X
Numeric or Matrix, n x p.
- Y
Numeric or Matrix, n x q. Must have same n as
X.- Ax
Column metric for X (W_X): vector/diagonal/matrix;
NULLmeans identity.- Ay
Column metric for Y (W_Y): vector/diagonal/matrix;
NULLmeans identity.- Mx
Row metric for X (M_X): vector/diagonal/matrix;
NULLmeans identity.- My
Row metric for Y (M_Y): vector/diagonal/matrix;
NULLmeans identity.- ncomp
Number of components to extract (rank-k). Default 2.
- preproc_x, preproc_y
Optional
multivariouspreprocessors (e.g.,center()). Defaults tomultivarious::pass()(no-op).- svd_backend
Character, one of
"eigencore"(default) or"irlba"for the iterative SVD. This choice only matters for larger problems: whenever bothXandYhave at most 64 columns after preprocessing, the operator materializesSdensely and computes a directsvd(), ignoringsvd_backendentirely (seegplssvd_op()).- svd_opts
List of options:
tolfor both backends andmaxitrfor irlba only. An incomplete eigencore solve raises an error of classgenpca_solver_nonconvergence; no unchecked fit is returned.- constraints_remedy
What to do with a metric that is not positive semi-definite:
"error"(default),"ridge","clip"or"identity"; repairs emit agenpca_metric_repairedwarning. Seegenpca().- verbose
Logical; print brief progress messages.
Value
An object of class c("genpls", "cross_projector", "projector")
with the same structure as genpls() returns (X-/Y-weights vx/vy,
singular values d, generalized weights p/q, scores fi/fj,
latent variables lx/ly, ncomp, and backend); see ?genpls for
the definition of each slot.
References
Beaton, D. (2020). Generalized eigen, singular value, and partial least squares decompositions: The GSVD package. (Eqs. 10-14). arXiv:2010.14734.