Implementing PCA/Whitening

From Ufldl

Jump to: navigation, search
Line 2: Line 2:
and also describe how you can implement them using efficient linear algebra libraries.
and also describe how you can implement them using efficient linear algebra libraries.
-
First, we need to ensure that the data has zero-mean, that is <math>  \frac{1}{m} \sum_{i=1}^m (x^{(i)}) = 0 </math>. We achieve this by first centering the dataset, such that it has zero-mean on expectation. In Matlab, we can do this by using
+
First, we need to ensure that the data has zero-mean, that is <math>  \frac{1}{m} \sum_{i=1}^m x^{(i)} = 0 </math>. We achieve this by first centering the dataset, such that it has zero-mean on expectation. In Matlab, we can do this by using
  avg = mean(x, 2);
  avg = mean(x, 2);

Revision as of 01:37, 29 April 2011

Personal tools