PCA
From Ufldl
(→What works well) |
m (sigma bug - should be 1/m xx^T, not just xx^T) |
||
Line 44: | Line 44: | ||
as follows: | as follows: | ||
:<math>\begin{align} | :<math>\begin{align} | ||
- | \Sigma = \sum_{i=1}^m (x^{(i)})(x^{(i)})^T. | + | \Sigma = \frac{1}{m} \sum_{i=1}^m (x^{(i)})(x^{(i)})^T. |
\end{align}</math> | \end{align}</math> | ||
- | If <math>\textstyle x</math> has zero mean, then <math>\textstyle | + | If <math>\textstyle x</math> has zero mean, then <math>\textstyle \Sigma</math> is exactly the covariance matrix of <math>\textstyle x</math>. |
It can then be shown that <math>\textstyle u_1</math>---the principal direction of variation of the data---is | It can then be shown that <math>\textstyle u_1</math>---the principal direction of variation of the data---is |