View source: R/group_reduced_rank_regression.R
cca_group_rrr_cv | R Documentation |
Performs group-sparse reduced-rank regression for CCA using either ADMM or CVXR solvers.
cca_group_rrr_cv(
X,
Y,
groups,
r = 2,
lambdas = 10^seq(-3, 1.5, length.out = 10),
kfolds = 5,
parallelize = FALSE,
standardize = FALSE,
LW_Sy = TRUE,
solver = "ADMM",
rho = 1,
thresh_0 = 1e-06,
niter = 10000,
thresh = 1e-04,
verbose = FALSE,
nb_cores = NULL
)
X |
Predictor matrix (n x p) |
Y |
Response matrix (n x q) |
groups |
List of index vectors defining groups of predictors |
r |
Target rank |
lambdas |
Grid of regularization parameters to try out |
kfolds |
Nb of folds for the CV procedure |
parallelize |
Whether to use parallel processing (default is FALSE) |
standardize |
Whether to scale variables |
LW_Sy |
Whether to apply Ledoit-Wolf shrinkage to Sy (default TRUE) |
solver |
Either "ADMM" or "CVXR" |
rho |
ADMM parameter |
thresh_0 |
tolerance for declaring entries non-zero |
niter |
Maximum number of ADMM iterations |
thresh |
Convergence threshold for ADMM |
verbose |
Print diagnostics |
nb_cores |
Number of cores to use for parallelization (default is all available cores minus 1) |
A list with elements:
Canonical direction matrix for X (p x r)
Canonical direction matrix for Y (q x r)
Optimal regularisation parameter lambda chosen by CV
Mean squared error of prediction (as computed in the CV)
Canonical covariances
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.