Академический Документы
Профессиональный Документы
Культура Документы
http://www.snl.salk.edu/~shlens/pub/notes/pca.pdf
This first version follows Section 5 (of above tutorial) by examining the covariance of the data
set.
% (M dimensions, N trials)
% PC - each column is a PC
[M,N] = size(data);
mn = mean(data,2);
[PC, V] = eig(covariance);
V = diag(V);
V = V(rindices);
PC = PC(:,rindices);
% (M dimensions, N trials)
% PC - each column is a PC
[M,N] = size(data);
mn = mean(data,2);
Y = data’ / sqrt(N-1);
[u,S,PC] = svd(Y);
S = diag(S);
V = S .* S;