典型相关分析 [英] Cannonical Correlation Analysis
问题描述
我刚刚开始在Matlab中使用CCA.我有两个维度为60x1920
和60x1536
的向量X
和Y
,样本数量为60
,不同向量集合中的变量分别为1920
和1536
.我想知道CCA将它们缩小到子空间,然后进行特征匹配.
I have just started working using CCA in Matlab. I have two vectors X
and Y
of dimension 60x1920
and 60x1536
with the number of samples being 60
and variables in the different set of vectors being 1920
and 1536
respectively. I want to know do CCA for reducing them to the subspace and then do feature matching.
我正在使用此命令.
%% DO CCA
[A,B,r,U,V] = canoncorr(X,Y);
我得到的输出是这样:
Name Size Bytes Class Attributes
A 1920x58 890880 double
B 1536x58 712704 double
U 60x58 27840 double
V 60x58 27840 double
r 1x58 464 double
谁能告诉我这些变量的含义.我已经浏览了几次文档,但仍不清楚.据我了解,CCA发现了两个线性投影矩阵Wx
和Wy
,使得X
和Y
在Wx
和Wy
上的投影具有最大的相关性.
Can anyone please tell me what these variables mean. I have gone over the documentation several times and still is unclear about them. As I understand CCA finds two linear projection matrices Wx
and Wy
such that the projection of X
and Y
on Wx
and Wy
are maximally correlated.
1)谁能告诉我以下哪些矩阵?
1) Could anyone please tell me which of the following matrices are these?
2)另外,如何在CCA的学习子空间中找到投影矢量?
2) Also how can I find the projected vectors in the learned subspace of CCA?
任何帮助将不胜感激.预先感谢.
Any help will be appreciated. Thanks in advance.
推荐答案
据我了解,以X
和Y
为原始数据矩阵,A
和B
是执行系数的集合改变基础以最大程度地关联您的原始数据.您的数据在新的基准中表示为矩阵U
和V
.
As I understand it, with X
and Y
being your original data matrices, A
and B
are the sets of coefficients that perform a change of basis to maximally correlate your original data. Your data is represented in the new bases as the matrices U
and V
.
所以回答您的问题:
-
您要查找的投影矩阵为
A
和B
,因为它们将X
和Y
转换为新的空间.
The projection matrices you are looking for would be
A
andB
since they transformX
andY
into the new space.
X
和Y
在新空间中的最终投影分别为U
和V
. (r
向量表示U
和V
之间的相关矩阵的项,它是对角矩阵.)
The resulting projections of X
and Y
into the new space would be U
and V
, respectively. (The r
vector represents the entries of the correlation matrix between U
and V
, which is a diagonal matrix.)
MATLAB文档表示,可以使用以下公式完成此转换,其中N
是观察数:
The The MATLAB documentation says this transformation can be done with the following formulae, where N
is the number of observations:
U = (X-repmat(mean(X),N,1))*A
V = (Y-repmat(mean(Y),N,1))*B
此页面很好地列出了流程,因此您可以看到每个系数意味着在转型过程中.
This page lays out the process nicely so you can see what each coefficient means in the transformation process.
这篇关于典型相关分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!