View source: R/reduced_rank_regression.R
cca_rrr | R Documentation |
Estimates canonical directions using various RRR solvers and penalties.
cca_rrr(
X,
Y,
Sx = NULL,
Sy = NULL,
lambda = 0,
r,
highdim = TRUE,
solver = "ADMM",
LW_Sy = TRUE,
standardize = TRUE,
rho = 1,
niter = 10000,
thresh = 1e-04,
thresh_0 = 1e-06,
verbose = FALSE
)
X |
Matrix of predictors. |
Y |
Matrix of responses. |
Sx |
Optional X covariance matrix. |
Sy |
Optional Y covariance matrix. |
lambda |
Regularization parameter. |
r |
Rank of the solution. |
highdim |
Boolean for high-dimensional regime. |
solver |
Solver type: "rrr", "CVX", or "ADMM". |
LW_Sy |
Whether to use Ledoit-Wolf shrinkage for Sy. |
standardize |
Logical; should X and Y be scaled. |
rho |
ADMM parameter. |
niter |
Maximum number of iterations for ADMM. |
thresh |
Convergence threshold. |
thresh_0 |
For the ADMM solver: Set entries whose absolute value is below this to 0 (default 1e-6). |
verbose |
Logical for verbose output. |
A list with elements:
U: Canonical direction matrix for X (p x r)
V: Canonical direction matrix for Y (q x r)
cor: Canonical covariances
loss: 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.