필터 지우기
필터 지우기

Canonical Correlation Analysis - canoncorr function in matlab

조회 수: 8 (최근 30일)
Nirmal
Nirmal 2013년 3월 7일
I am just starting with CCA, I am trying to explore it using the matlab function, but I guess I am stuck understand the result I get using canoncorr function.
[A,B,r,U,V] = canoncorr(X,Y)
My understanding is that I would get U=A'*X, and Y=B'Y, but doing that with the return type does not give me the expected result.
I tried looking at the code for canoncorr. It has something like
if nargout > 3
U = X * A;
V = Y * B;
end
I am not sure, why U is being calculated like that, as opposed to definition here http://en.wikipedia.org/wiki/Canonical_correlation

답변 (1개)

Tom Lane
Tom Lane 2013년 3월 7일
Try comparing V with the product
bsxfun(@minus,Y,mean(Y))*B
The first factor is just Y with the column means subtracted. Alternatively, you can compute Y*B and subtract the column means of the result.

카테고리

Help CenterFile Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by