cca_group_rrr: Group-Sparse Canonical Correlation via Reduced-Rank...

View source: R/group_reduced_rank_regression.R

cca_group_rrrR Documentation

Group-Sparse Canonical Correlation via Reduced-Rank Regression

Description

Performs group-sparse reduced-rank regression for CCA using either ADMM or CVXR solvers.

Usage

cca_group_rrr(
  X,
  Y,
  groups,
  Sx = NULL,
  Sy = NULL,
  Sxy = NULL,
  lambda = 0,
  r,
  standardize = FALSE,
  LW_Sy = TRUE,
  solver = "ADMM",
  rho = 1,
  niter = 10000,
  thresh = 1e-04,
  thresh_0 = 1e-06,
  verbose = FALSE
)

Arguments

X

Predictor matrix (n x p)

Y

Response matrix (n x q)

groups

List of index vectors defining groups of predictors

Sx

Optional covariance matrix for X; if NULL computed internally

Sy

Optional covariance matrix for Y; if NULL computed internally

Sxy

Optional cross covariance matrix for X and Y; if NULL computed internally

lambda

Regularization parameter

r

Target rank

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

niter

Maximum number of ADMM iterations

thresh

Convergence threshold for ADMM

thresh_0

tolerance for declaring entries non-zero

verbose

Print diagnostics

Value

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


ccar3 documentation built on Sept. 16, 2025, 9:11 a.m.