PCA for a vector such as [100-by-1]
Ältere Kommentare anzeigen
Is it reasonable to do a PCA on a vector? I've been using Matlab with this code:
[M,N] = size(A); mn = mean(A);
A = A - repmat(mn,1,N);
B = A'; [u,s,pc] = svd(B);
S_diag = diag(S); V = S_diag .* S_diag;
Aout = PC' * A;
and I got PC is a [100,100] matrix and principal component 1 is Aout(1,1), principal component 2 is Aout(2,1) and so on.
Not sure if this is correct. Please help and Thank you.
2 Kommentare
Greg Heath
am 4 Nov. 2013
I don't understand your terminology "PCA on a vector". You have performed PCA on a matrix, which is correct.
Or am I missing something?
Andrea Le
am 4 Nov. 2013
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Dimensionality Reduction and Feature Extraction finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!