Implement PCA
This commit is contained in:
parent
5f3f65c69c
commit
2b98bd80f0
1 changed files with 29 additions and 31 deletions
|
@ -20,11 +20,9 @@ S = zeros(n);
|
||||||
% number of examples).
|
% number of examples).
|
||||||
%
|
%
|
||||||
|
|
||||||
|
Sigma = 1/m * X'*X; % covariance matrix
|
||||||
|
|
||||||
|
[U, S, V] = svd(Sigma);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% =========================================================================
|
% =========================================================================
|
||||||
|
|
||||||
|
|
Reference in a new issue