| genplsc | R Documentation |
Convenience alias for genpls(); computes canonical generalized PLS
(PLS-SVD/GPLSSVD). See ?genpls for full documentation.
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
)
X |
Numeric or Matrix, n x p. |
Y |
Numeric or Matrix, n x q. Must have same n as |
Ax |
Column metric for X (W_X): vector/diagonal/matrix; |
Ay |
Column metric for Y (W_Y): vector/diagonal/matrix; |
Mx |
Row metric for X (M_X): vector/diagonal/matrix; |
My |
Row metric for Y (M_Y): vector/diagonal/matrix; |
ncomp |
Number of components to extract (rank-k). Default 2. |
preproc_x, preproc_y |
Optional |
svd_backend |
Character, one of |
svd_opts |
List of options: |
constraints_remedy |
What to do with a metric that is not positive
semi-definite: |
verbose |
Logical; print brief progress messages. |
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.
Beaton, D. (2020). Generalized eigen, singular value, and partial least squares decompositions: The GSVD package. (Eqs. 10-14). arXiv:2010.14734.
genpls()
set.seed(1)
X <- matrix(rnorm(60 * 5), 60, 5)
Y <- matrix(rnorm(60 * 4), 60, 4)
fit <- genplsc(X, Y, ncomp = 2,
preproc_x = multivarious::center(),
preproc_y = multivarious::center())
fit$d
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.