View source: R/graph_reduced_rank_regression.R
cca_graph_rrr | R Documentation |
Solves a sparse canonical correlation problem using a graph-constrained reduced-rank regression formulation. The problem is solved via an ADMM approach.
cca_graph_rrr(
X,
Y,
Gamma,
Sx = NULL,
Sy = NULL,
Sxy = NULL,
lambda = 0,
r,
standardize = FALSE,
LW_Sy = TRUE,
rho = 10,
niter = 10000,
thresh = 1e-04,
thresh_0 = 1e-06,
verbose = FALSE,
Gamma_dagger = NULL
)
X |
Matrix of predictors (n x p) |
Y |
Matrix of responses (n x q) |
Gamma |
Graph constraint matrix (g x p) |
Sx |
Optional covariance matrix for X. If NULL, computed as t(X) %*% X / n |
Sy |
Optional covariance matrix for Y. If NULL, computed similarly; optionally shrunk via Ledoit-Wolf |
Sxy |
Optional cross-covariance matrix (not currently used) |
lambda |
Regularization parameter for sparsity |
r |
Target rank |
standardize |
Whether to center and scale X and Y (default FALSE = center only) |
LW_Sy |
Whether to apply Ledoit-Wolf shrinkage to Sy |
rho |
ADMM penalty parameter |
niter |
Maximum number of ADMM iterations |
thresh |
Convergence threshold for ADMM |
thresh_0 |
Threshold for small values in the coefficient matrix (default 1e-6) |
verbose |
Whether to print diagnostic output |
Gamma_dagger |
Optional pseudoinverse of Gamma (computed if NULL) |
A list with elements:
Canonical direction matrix for X (p x r)
Canonical direction matrix for Y (q x r)
Canonical covariances
The prediction error 1/n * \| XU - YV\|^2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.