cca_graph_rrr: Graph-regularized Reduced-Rank Regression for Canonical...

View source: R/graph_reduced_rank_regression.R

cca_graph_rrrR Documentation

Graph-regularized Reduced-Rank Regression for Canonical Correlation Analysis

Description

Solves a sparse canonical correlation problem using a graph-constrained reduced-rank regression formulation. The problem is solved via an ADMM approach.

Usage

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
)

Arguments

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)

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.