[Master Index]
[Index for export/brede]
brede_mat_cca
(export/brede/brede_mat_cca.m)
Function Synopsis
[A,S,B] = brede_mat_cca(X, Y, varargin)
Help text
brede_mat_cca - Canonical correlation analysis
[A,S,B] = brede_mat_cca(X, Y, 'PropertyName', 'PropertyValue')
Input: X 'Mat' structure
Y 'Mat' structure
Property: Centering [ {None} | Both ]
InputComponents [ All | {EigenvaluesAboveMean} | a
positive integer ]
Nuisance 'Mat' structure with
nuisance/covariates
Output: A Left canonical correlation vectors
S Canonical correlation coefficients
B Right canonical correlation vectors
Canonical correlation analysis between two matrices. The two
input matrices should have the same number rows.
By default the data is not centered (centering=none).
By default the data is projected to a subspace by singular
value decomposision ('InputComponents'='EigenvaluesAboveMean')
and only the subspace associated with principal component
eigenvalues above or equal to their mean are included in the
further canonical correlation analysis.
If the 'nuisance' property is defined a nuisance subspace will
be removed from X and Y for covariance-adjusted canonical
correlation analysis to obtain partial canonical correlation
coefficients.
Example:
% Example from Mardia 1979
load(fullfile(fileparts(which('brede')), 'data', 'FretsG1921Heredity.txt'))
X = FretsG1921Heredity(:,1:2);
Y = FretsG1921Heredity(:,3:4);
[A,S,B] = brede_mat_cca(X,Y, 'centering', 'both', 'inputcomponents', 'all');
diag(S.matrix) % These should be approx. 0.7886 and 0.0539.
% Text mining example
Mvoxel = brede_bib_bib2mat(B, 'type', 'Exp.Loc.coord');
Mterm0 = brede_bib_bib2mat(B, 'type', 'abstract');
M = brede_mat_elimsingle(Mterm0);
M = brede_mat_elimstop(M, 'filename', 'stop_english1.txt');
M = brede_mat_elimstop(M, 'filename', 'stop_medline.txt');
M = brede_mat_elimstop(M, 'filename', 'stop_meshcommon.txt');
M = brede_mat_elimstop(M, 'filename', 'stop_pubmed_neg1.txt');
Mterm = brede_mat_scale(M, 'type', 'idf');
[A,S,C] = brede_mat_cca(Mvoxel, Mterm)
brede_mat_2mat2html(A, C, 'filename', 'cca.html');
See also BREDE, BREDE_MAT, BREDE_MAT_IBFA, BREDE_MAT_KMC,
BREDE_MAT_ORTHOSPACE, BREDE_MAT_SVD, BREDE_MAT_NMF.
$Id: brede_mat_cca.m,v 1.10 2007/11/08 22:54:35 fn Exp $
Cross-Reference Information
This function calls
Produced by mat2html on Fri Jun 20 17:43:05 2008
Cross-Directory links are: OFF