% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ecca.r
\name{ecca}
\alias{ecca}
\title{Efficient CCA for Two High-Dimensional Views}
\usage{
ecca(
  X,
  Y,
  lambda = 0,
  groups = NULL,
  r = 2,
  standardize = FALSE,
  rho = 1,
  B0 = NULL,
  eps = 1e-04,
  maxiter = 500,
  verbose = TRUE,
  epsilon_sv = 1e-08,
  ridge_whiten = 1e-08
)
}
\arguments{
\item{X}{Predictor matrix (n x p).}

\item{Y}{Response matrix (n x q).}

\item{lambda}{Regularization parameter.}

\item{groups}{Optional group structure for blockwise sparsity.}

\item{r}{Target rank.}

\item{standardize}{Whether to scale variables after centering.}

\item{rho}{ADMM penalty parameter.}

\item{B0}{Optional warm start for the coefficient matrix.}

\item{eps}{Convergence tolerance for ADMM.}

\item{maxiter}{Maximum number of ADMM iterations.}

\item{verbose}{Whether to print diagnostics.}

\item{epsilon_sv}{Numerical threshold used to discard near-zero singular values.}

\item{ridge_whiten}{Ridge added when whitening Gram matrices.}
}
\value{
A list containing the estimated canonical directions, canonical
correlations, the fitted coefficient matrix, preprocessing metadata, and
convergence information.
}
\description{
Fits sparse canonical directions with an ADMM-based reduced-rank regression
formulation tailored to the setting where both views are high-dimensional.
}
