实现主成分分析和白化
From Ufldl
Line 1: | Line 1: | ||
- | |||
版本 作者 Email 说明 | 版本 作者 Email 说明 | ||
Line 43: | Line 42: | ||
xPCAwhite = diag(1./sqrt(diag(S) + epsilon)) * U' * x; | xPCAwhite = diag(1./sqrt(diag(S) + epsilon)) * U' * x; | ||
- | 因为 <math>S</math> 的对角线包括了特征值 <math>\textstyle \lambda_i</math> ,这其实就是同时为所有样本<math>\textstyle i</math>计算 | + | 因为 <math>S</math> 的对角线包括了特征值 <math>\textstyle \lambda_i</math> ,这其实就是同时为所有样本<math>\textstyle i</math>计算 <math>\textstyle x_{{\rm PCAwhite},i} = \frac{x_{{\rm rot},i} }{\sqrt{\lambda_i}}</math> 的简洁表达。 |
- | + | ||
最后,你也可以这样计算ZCA白化后的数据<math>\textstyle x_{\rm ZCAwhite}</math>: | 最后,你也可以这样计算ZCA白化后的数据<math>\textstyle x_{\rm ZCAwhite}</math>: | ||
xZCAwhite = U * diag(1./sqrt(diag(S) + epsilon)) * U' * x; | xZCAwhite = U * diag(1./sqrt(diag(S) + epsilon)) * U' * x; |