Skip to main content

Canonical Correlation Analysis Zoo: CCA, GCCA, MCCA, DCCA, DGCCA, DVCCA, DCCAE, KCCA and regularised variants including sparse CCA , ridge CCA and elastic CCA

Project description

DOI codecov Build Status Documentation Status

now including tensor and deep tensor cca!

Installation

Note: for everything except the deep learning based models use: pip install cca-zoo

For deep learning elements use: pip install cca-zoo[deep]

This means that there is no need to install the large pytorch package to run cca-zoo unless you wish to use deep learning

Documentation

Available at https://cca-zoo.readthedocs.io/en/latest/

Credits:

If this repository was helpful to you please do give a star.

In case this work is used as part of research I attach a DOI bibtex entry:

@software{james_chapman_2021_4586389,
  author       = {James Chapman},
  title        = {jameschapman19/cca\_zoo: v1.1.22},
  month        = mar,
  year         = 2021,
  publisher    = {Zenodo},
  version      = {v1.1.22},
  doi          = {10.5281/zenodo.4586389},
  url          = {https://doi.org/10.5281/zenodo.4586389}
}

Canonical Correlation Analysis Methods: cca-zoo

Linear CCA/PLS:

A variety of linear CCA and PLS methods implemented where possible as the solutions to generalized eigenvalue problems and otherwise using alternating minimization methods for non-convex optimisation based on least squares

CCA (Canonical Correlation Analysis)

Solutions based on either alternating least squares or as the solution to genrralized eigenvalue problem

GCCA (Generalized CCA) :

https://academic.oup.com/biomet/article-abstract/58/3/433/233349?redirectedFrom=fulltext

MCCA (Multiset CCA)

TCCA (Tensor CCA) :

https://arxiv.org/pdf/1502.02330.pdf

SCCA (Sparse CCA) :

Mai's sparse CCA

SPLS (Sparse PLS/Penalized Matrix Decomposition) :

Witten's sparse CCA

PCCA (Penalized CCA - elastic net)

Waiijenborg's elastic penalized CCA

Deep CCA:

A variety of Deep CCA and related methods. All allow for user to pass their own model architectures. Recently added solutions to DCCA using nob-linear orthogonal iterations (or alternating least squares)

DCCA (Deep CCA) :

https://ttic.uchicago.edu/~klivescu/papers/andrew_icml2013.pdf https://arxiv.org/pdf/1510.02054v1.pdf Using either Andrew's original Tracenorm Objective or Wang's alternating least squares solution

DGCCA (Deep Generalized CCA) :

https://www.aclweb.org/anthology/W19-4301.pdf An alternative objective based on the linear GCCA solution. Can be extended to more than 2 views

DMCCA (Deep Multiset CCA) :

https://arxiv.org/abs/1904.01775 An alternative objective based on the linear MCCA solution. Can be extended to more than 2 views

DTCCA (Deep Tensor CCA) :

https://arxiv.org/pdf/2005.11914.pdf

DCCAE (Deep Canonically Correlated Autoencoders) :

http://proceedings.mlr.press/v37/wangb15.pdf

DVCCA/DVCCA Private (Deep variational CCA):

https://arxiv.org/pdf/1610.03454.pdf Wang's DVCCA and DVCCA Private

Kernel CCA:

Linear Kernel

RBF Kernel

Polynomial Kernels

Issues/Feedback

I've translated my work building baselines for my own research into a python package for my own experience but also, I hope, to help others. With that in mind if you have either suggestions for improvements/additions do let me know using the issues tab. The intention is to give flexibility to build new algorithms and substitute model architectures but there is a tradeoff between robustness and flexibility.

Sources

I've added this section to give due credit to the repositories that helped me in addition to their copyright notices in the code where relevant.

Models can be tested on data from MNIST datasets provided by the torch package (https://pytorch.org/) and the UCI dataset provided by mvlearn package (https://mvlearn.github.io/)

Other Implementations of DCCA/DCCAE:

Keras implementation of DCCA from @VahidooX's github page(https://github.com/VahidooX) The following are the other implementations of DCCA in MATLAB and C++. These codes are written by the authors of the original paper:

Torch implementation of DCCA from @MichaelVll & @Arminarj: https://github.com/Michaelvll/DeepCCA

C++ implementation of DCCA from Galen Andrew's website (https://homes.cs.washington.edu/~galen/)

MATLAB implementation of DCCA/DCCAE from Weiran Wang's website (http://ttic.uchicago.edu/~wwang5/dccae.html)

MATLAB implementation of TCCA from https://github.com/rciszek/mdr_tcca

Implementation of VAE:

Torch implementation of VAE (https://github.com/pytorch/examples/tree/master/vae)

Implementation of Sparse PLS:

MATLAB implementation of SPLS by @jmmonteiro (https://github.com/jmmonteiro/spls)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cca_zoo-1.2.5.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cca_zoo-1.2.5-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file cca_zoo-1.2.5.tar.gz.

File metadata

  • Download URL: cca_zoo-1.2.5.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for cca_zoo-1.2.5.tar.gz
Algorithm Hash digest
SHA256 ed59d86a9c9fe82b8bae4ecfba4d404769893b6ea4625b2b3af00765cddfd8e1
MD5 e1d0a6c09e1f7f189b45ccca9dd3c53a
BLAKE2b-256 8e7f4ef2476033fba4dc5dae3e8192d2c66fde89e769ed34cec5bcbd84ecec09

See more details on using hashes here.

File details

Details for the file cca_zoo-1.2.5-py3-none-any.whl.

File metadata

  • Download URL: cca_zoo-1.2.5-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for cca_zoo-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8b38fc8999cbd284e14490d7f2ad8c224c76dab2db279a80aafb7f3039f3e3fb
MD5 edbdd6e941c07363a4546a86ab868216
BLAKE2b-256 6ec4a73195b47ba7628409ce93fbf01005a84f8f9e19f6e8fd54a481ddc2a154

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page