Saturday, March 31, 2012

Kernel Canonical Correlation Analysis code for Matlab

I've made a package with kernel canonical correlation analysis (KCCA) code for Matlab, as part of the experiments I did for a paper. While there are some other packages out there, most notably David Hardoon's KCCA code [1] and Francis Bach's kernel ICA code [2], I wanted a KCCA implementation that included a demo file in addition to the KCCA functions, and I wanted it to be very fast.

The code performs standard regularized KCCA and it includes a demonstration on some synthetically generated data. It can be modified easily to work on external data sets and to use custom kernel functions. The KCCA implementation decomposes the kernel matrices using incomplete Cholesky decomposition, which does not require to calculate the entire kernel matrix (see [2] for more details). The code contains different forms of the generalized eigenvalue problem, all of which yield very similar results. A demo that performs full KCCA without decomposing the kernel matrices is also included.

Download the KCCA code here:
http://sourceforge.net/projects/kmbox/files/packs/

The package is part of my Kernel Methods toolbox, which is still very much in beta. Suggestions are welcome.

References:
[1] D. R. Hardoon, S. Szedmak and J. Shawe-Taylor, "Canonical Correlation Analysis: An Overview with Application to Learning Methods", Neural Computation, Volume 16 (12), Pages 2639--2664, 2004.
[2] F. R. Bach and Michael I. Jordan. "Kernel Independent Component Analysis", Journal of Machine Learning Research, volume 3, pages 1-48, 2002.