ecca.cv | R Documentation |
Performs group-sparse reduced-rank regression for CCA using either ADMM or CVXR solvers.
ecca.cv(
X,
Y,
lambdas = 0,
groups = NULL,
r = 2,
standardize = FALSE,
rho = 1,
B0 = NULL,
nfold = 5,
select = "lambda.min",
eps = 1e-04,
maxiter = 500,
verbose = FALSE,
parallel = FALSE,
nb_cores = NULL,
set_seed_cv = NULL,
scoring_method = "mse",
cv_use_median = FALSE
)
X |
Predictor matrix (n x p) |
Y |
Response matrix (n x q) |
lambdas |
Choice of regularization parameter |
groups |
List of index vectors defining groups of predictors |
r |
Target rank |
standardize |
Whether to scale variables |
rho |
ADMM parameter |
B0 |
Initial value for the coefficient matrix (optional) |
nfold |
Number of cross-validation folds |
select |
Which lambda to select: "lambda.min" or "lambda.1se" |
eps |
Convergence threshold for ADMM |
maxiter |
Maximum number of ADMM iterations |
verbose |
Print diagnostics |
parallel |
Whether to run cross-validation in parallel |
nb_cores |
Number of cores to use for parallel processing (default is NULL, which uses all available cores) |
set_seed_cv |
Optional seed for reproducibility of cross-validation folds (de) |
scoring_method |
Method to score the model during cross-validation, either "mse" (mean squared error) or "trace" (trace of the product of matrices) |
cv_use_median |
Whether to use the median of the cross-validation scores instead of the mean. Default is FALSE. |
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.