Principal Component Analysis in MATLAB
问题 I'm implementing PCA using eigenvalue decomposition for sparse data. I know matlab has PCA implemented, but it helps me understand all the technicalities when I write code. I've been following the guidance from here, but I'm getting different results in comparison to built-in function princomp. Could anybody look at it and point me in the right direction. Here's the code: function [mu, Ev, Val ] = pca(data) % mu - mean image % Ev - matrix whose columns are the eigenvectors corresponding to