白化
From Ufldl
Line 57: | Line 57: | ||
(注: 严格地讲, 这部分许多关于“协方差”的陈述仅当数据均值为0时成立。下文的论述都隐式地假定这一条件成立。不过即使数据均值不为0,下文的说法仍然成立。) | (注: 严格地讲, 这部分许多关于“协方差”的陈述仅当数据均值为0时成立。下文的论述都隐式地假定这一条件成立。不过即使数据均值不为0,下文的说法仍然成立。) | ||
+ | |||
+ | :【原文】: | ||
+ | It is no accident that the diagonal values are <math>\textstyle \lambda_1</math> and <math>\textstyle \lambda_2</math>. | ||
+ | Further, | ||
+ | the off-diagonal entries are zero; thus, | ||
+ | <math>\textstyle x_{{\rm rot},1}</math> and <math>\textstyle x_{{\rm rot},2}</math> are uncorrelated, satisfying one of our desiderata | ||
+ | for whitened data (that the features be less correlated). | ||
+ | |||
+ | To make each of our input features have unit variance, we can simply rescale | ||
+ | each feature <math>\textstyle x_{{\rm rot},i}</math> by <math>\textstyle 1/\sqrt{\lambda_i}</math>. Concretely, we define | ||
+ | our whitened data <math>\textstyle x_{{\rm PCAwhite}} \in \Re^n</math> as follows: | ||
+ | :<math>\begin{align} | ||
+ | x_{{\rm PCAwhite},i} = \frac{x_{{\rm rot},i} }{\sqrt{\lambda_i}}. | ||
+ | \end{align}</math> | ||
+ | Plotting <math>\textstyle x_{{\rm PCAwhite}}</math>, we get: | ||
+ | |||
+ | [[File:PCA-whitened.png | 600px]] | ||
+ | |||
+ | :【初译】: | ||
+ | 毫无疑问,对角元素的值为<math>\textstyle \lambda_1</math>和<math>\textstyle \lambda_2</math>。非对角元素值为0; 并且,<math>\textstyle x_{{\rm rot},1}</math>和<math>\textstyle x_{{\rm rot},2}</math>是不相关的, 满足其中一个我们对白化结果的要求 (特征间更不相关)。 | ||
+ | 为了使我们每个输入特征具有单位方差,可以直接使用<math>\textstyle 1/\sqrt{\lambda_i}</math>来缩放每个特征<math>\textstyle x_{{\rm rot},i}</math>。具体地,我们定义白化后的数据<math>\textstyle x_{{\rm PCAwhite}} \in \Re^n</math>如下: | ||
+ | |||
+ | 绘制出<math>\textstyle x_{{\rm PCAwhite}}</math>, 我们得到: | ||
+ | :【一校】: | ||
+ | 毫无疑问, 协方差矩阵对角元素的值为<math>\textstyle \lambda_1</math>和<math>\textstyle \lambda_2</math>。非对角元素值为0; 并且,<math>\textstyle x_{{\rm rot},1}</math>和<math>\textstyle x_{{\rm rot},2}</math>是不相关的, 满足我们对白化结果的第一个要求 (特征间相关性降低)。 | ||
+ | 为了使每个输入特征具有单位方差,我们可以直接使用<math>\textstyle 1/\sqrt{\lambda_i}</math>来缩放每个特征<math>\textstyle x_{{\rm rot},i}</math>。具体地,我们定义白化后的数据<math>\textstyle x_{{\rm PCAwhite}} \in \Re^n</math>如下: | ||
+ | |||
+ | 绘制出<math>\textstyle x_{{\rm PCAwhite}}</math>, 我们得到: | ||
+ | |||
+ | :【原文】: | ||
+ | |||
+ | This data now has covariance equal to the identity matrix <math>\textstyle I</math>. We say that | ||
+ | <math>\textstyle x_{{\rm PCAwhite}}</math> is our '''PCA whitened''' version of the data: The | ||
+ | different components of <math>\textstyle x_{{\rm PCAwhite}}</math> are uncorrelated and have | ||
+ | unit variance. | ||
+ | '''Whitening combined with dimensionality reduction.''' | ||
+ | If you want to have data that is whitened and which is lower dimensional than | ||
+ | the original input, you can also optionally keep only the top <math>\textstyle k</math> components of | ||
+ | <math>\textstyle x_{{\rm PCAwhite}}</math>. When we combine PCA whitening with regularization | ||
+ | (described later), the last few components of <math>\textstyle x_{{\rm PCAwhite}}</math> will be | ||
+ | nearly zero anyway, and thus can safely be dropped. | ||
+ | |||
+ | :【初译】: | ||
+ | |||
+ | 这些数据现在的协方差矩阵为单位矩阵<math>\textstyle I</math>. 我们说,<math>\textstyle x_{{\rm PCAwhite}}</math>是数据经过PCA白化的版本:<math>\textstyle x_{{\rm PCAwhite}}</math>中不同的成分是不相关的并且具有单位方差。 | ||
+ | 白化与维度降低相结合. | ||
+ | 如果你想得到经过白化并且维度比初试输入更低的数据, 你也可以任意地仅保留前<math>\textstyle k</math>个<math>\textstyle x_{{\rm PCAwhite}}</math>中的成分。当我们把PCA白化和正则化结合起来时(在稍后讨论),在最后的一些<math>\textstyle x_{{\rm PCAwhite}}</math>的成分将总是接近于0,因此可以放心地舍弃它们。 | ||
+ | |||
+ | :【一校】: | ||
+ | |||
+ | 这些数据现在的协方差矩阵为单位矩阵<math>\textstyle I</math>. 我们说,<math>\textstyle x_{{\rm PCAwhite}}</math>是数据经过PCA白化后的版本:<math>\textstyle x_{{\rm PCAwhite}}</math>中不同的特征之间是不相关并且具有单位方差。 | ||
+ | 白化与降维相结合. | ||
+ | 如果你要经过白化并且维度比初始输入更低维的数据, 也可以仅保留<math>\textstyle x_{{\rm PCAwhite}}</math>中前<math>\textstyle k</math>个的成分。当我们把PCA白化和正则化结合起来时(在稍后讨论),<math>\textstyle x_{{\rm PCAwhite}}</math>中最后的少量成分将总是接近于0,因而舍弃这些成分不会带来很大的问题。 | ||
+ | |||
+ | :【原文】: | ||
+ | |||
+ | |||
+ | |||
+ | :【初译】: | ||
+ | |||
+ | |||
+ | |||
+ | :【一校】: | ||
+ | |||
+ | |||
+ | |||
+ | :【原文】: | ||
+ | |||
+ | |||
+ | |||
+ | :【初译】: | ||
+ | |||
+ | |||
+ | |||
+ | :【一校】: | ||
+ | |||
+ | |||
+ | |||
+ | :【原文】: | ||
+ | |||
+ | |||
+ | |||
+ | :【初译】: | ||
+ | |||
+ | |||
+ | |||
+ | :【一校】: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | :【原文】: | ||
+ | |||
+ | |||
+ | |||
+ | :【初译】: | ||
+ | |||
+ | |||
+ | |||
+ | :【一校】: | ||
+ | |||
+ | |||
+ | |||
+ | :【原文】: | ||
+ | |||
+ | |||
+ | |||
+ | :【初译】: | ||
+ | |||
+ | |||
+ | |||
+ | :【一校】: | ||
+ | |||
+ | |||
+ | |||
+ | :【原文】: | ||
+ | |||
+ | |||
+ | |||
+ | :【初译】: | ||
+ | |||
+ | |||
+ | |||
+ | :【一校】: | ||
+ | |||
+ | |||
+ | |||
+ | :【原文】: | ||
+ | |||
+ | |||
+ | |||
+ | :【初译】: | ||
+ | |||
+ | |||
+ | |||
+ | :【一校】: |