Implementing PCA/Whitening

From Ufldl

Jump to: navigation, search
Line 6: Line 6:
We achieve this by computing the mean for each patch and subtracting it for each patch. In Matlab, we can do this by using
We achieve this by computing the mean for each patch and subtracting it for each patch. In Matlab, we can do this by using
-
  avg = mean(x, 1);
+
  avg = mean(x, 1);     % Compute the mean pixel intensity value separately for each patch.
  x = x - repmat(avg, size(x, 1), 1);
  x = x - repmat(avg, size(x, 1), 1);

Revision as of 15:54, 6 May 2011

Personal tools