PCA
给定矩阵X我们需要旋转它以使得数据沿着最大变化方向,这意味着我们需要用一个旋转矩阵去乘以数据矩阵X,也就是Y=transpose(P)*X,这里P被用来使得Y的协方差矩阵变为对角形。
cov(Y) = cov(transpose(P)*X) = [对角矩阵]
由协方差定义知:
cov(Y) = E[Y*transpose(Y)] = E[(transpose(P)*X)*transpose((transpose(P)*X))]
= E[ (transpose(P)*X)*(transpose(X)*P) ]
= transpose(P)E(X*transpose(X))*P
= transpose(P)cov(X)*P
又对于选择矩阵 P ,inv(p) = transpose(P)
=> P*cov(Y) = cov(X)*P
P*cov(Y) = [lamd1*p1,lamd2*p2,……lamdN*pN] = cov(X)*P
由上式可以得出,P即为cov(X)的特征向量,lamd值即为cov(X)的特征值。