Skip to content

Latest commit

 

History

203 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nonlinear Sparse Generalized Canonical Correlation Analysis

arXiv PDF

Official Python implementation of NSGCCA, from the following paper:

Nonlinear Sparse Generalized Canonical Correlation Analysis for Multi-view High-dimensional Data.
Rong Wu, Ziqi Chen, Gen Li and Hai Shu.
New York University
[arXiv]


We propose three nonlinear, sparse, generalized CCA methods, HSIC-SGCCA, SA-KGCCA, and TS-KGCCA, for variable selection in multi-view high-dimensional data. These methods extend existing SCCA-HSIC, SA-KCCA, and TS-KCCA from two-view to multi-view settings. While SA-KGCCA and TS-KGCCA yield multi-convex optimization problems solved via block coordinate descent, HSIC-SGCCA introduces a necessary unit-variance constraint previously ignored in SCCA-HSIC, resulting in a nonconvex, non-multiconvex problem. We efficiently address this challenge by integrating the block prox-linear method with the linearized alternating direction method of multipliers. Simulations and TCGA-BRCA data analysis demonstrate that HSIC-SGCCA outperforms competing methods in variable selection.

Installation

Requirements: Python 3.10 Clone this repository and install other required packages:

git clone git@github.com:Rows21/NSGCCA
cd NSGCCA
conda env create -f env.yml

Model Training

Datasets

(Feel free to post suggestions in issues of recommending latest proposed CCA network for comparison. Currently, the baselines folder is to put comparable models.)

Hyper-parameter tuning

We design hyper-parameter tuning before function executions:

HSIC-SGCCA

Use function: solver.tune_hyper(views, k=5, mode='cv')

TS-KGCCA & SA-KGCCA

The hyper-paramter tuning structures are built-in functions.

Training

  • Follow the Tutorial file for training HSIC-SGCCA, SA-KGCCA and TS-KGCCA.
## For HSIC-SGCCA
u = solver.SNGCCA.fit_admm(views, constraint=constraint)

## For TS-KGCCA
s_k, u = tskgcca(views)

## For SA-KGCCA
u = sakgcca(views)

  • Note that for KGCCA component in TS-KGCCA, we use function tskcca_post in the tskgcca_post file for simulation and tskgcca_post_real file for real data example.
  • Higher-stage calculation is controlled by stage = n.

Results

Simulation Studies

FIgure 1: The variable selection performance are processed through Select.Rmd.
Figure 2: The Normalized sample HSIC performance are calculated through CKA.Rmd.
Figure 3: The scatter plots are generated through Linear_Combination.Rmd.

Real-World Studies -- TCGA breast cancer database

Data_download_preprocess: TCGA-BRCA preprocessing through R script.
Venn Diagram: The clustering results for TCGA-BRCA. Survival model is processed through XGBoost-AFT model and SurvivalEVAL package.

Citation

If you find this repository helpful, please consider citing:

@article{wu2025nonlinear,
  title={Nonlinear Sparse Generalized Canonical Correlation Analysis for Multi-view High-dimensional Data},
  author={Wu, Rong and Chen, Ziqi and Li, Gen and Shu, Hai},
  journal={arXiv preprint arXiv:2502.18756},
  year={2025}
}

Acknowledgement

This repository is built using the timm library.

License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

CC BY-NC 4.0

© 2025 Rong Wu. You are free to share and adapt the material with attribution.

About

Official Implementation of Nonlinear Sparse Generalized Canonical Correlation Analysis (NSGCCA)

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages