主成分分析
From Ufldl
(→Reducing the Data Dimension 数据降维) |
(→Rotating the Data 旋转数据) |
||
Line 193: | Line 193: | ||
(下标“rot”来源于单词“rotation”,意指这是原数据经过旋转(也可以说成映射)得到后得到的结果)数据集中的每个数据<math>\textstyle i</math>经过<math>\textstyle x_{\rm rot}^{(i)} = U^Tx^{(i)}</math>计算后,可以画出如下映射数据<math>\textstyle x_{\rm rot}</math>图: | (下标“rot”来源于单词“rotation”,意指这是原数据经过旋转(也可以说成映射)得到后得到的结果)数据集中的每个数据<math>\textstyle i</math>经过<math>\textstyle x_{\rm rot}^{(i)} = U^Tx^{(i)}</math>计算后,可以画出如下映射数据<math>\textstyle x_{\rm rot}</math>图: | ||
- | + | 【一审】:由此,我们可以计算出以<math>\textstyle (u_1, u_2)</math>为基的<math>\textstyle x</math>的映射表示。 | |
- | + | :<math>\begin{align} | |
+ | x_{\rm rot} = U^Tx = \begin{bmatrix} u_1^Tx \\ u_2^Tx \end{bmatrix} | ||
+ | \end{align}</math> | ||
+ | (下标“rot”来源于单词“rotation”,意指这是原数据经过旋转(也可以说成映射)得到后得到的结果)数据集中的每个数据<math>\textstyle i</math>经过<math>\textstyle x_{\rm rot}^{(i)} = U^Tx^{(i)}</math>计算后,可以画出如下变换映射数据<math>\textstyle x_{\rm rot}</math>图: | ||
【二审】: | 【二审】: | ||
Line 224: | Line 227: | ||
因为<math>\textstyle U x_{\rm rot} = UU^T x = x</math> | 因为<math>\textstyle U x_{\rm rot} = UU^T x = x</math> | ||
- | + | 【一审】:这就是训练数据集旋转到以<math>\textstyle u_1</math>,<math>\textstyle u_2</math>为基后的数据。但是通常情况下,训练数据集合通过<math>\textstyle U^Tx</math>旋转后会得到的是<math>\textstyle n</math>维的<math>\textstyle u_1</math>,<math>\textstyle u_2</math>, ...,<math>\textstyle u_n</math>。由于矩阵<math>\textstyle U</math>具有正交性,也就是说它满足<math>\textstyle U^TU = UU^T = I</math>,所以假若想从<math>\textstyle x_{\rm rot}</math>中还原<math>\textstyle x</math>,可以通过如下计算: | |
- | + | :<math>\begin{align} | |
+ | x = U x_{\rm rot} , | ||
+ | \end{align}</math> | ||
+ | 因为<math>\textstyle U x_{\rm rot} = UU^T x = x</math> | ||
+ | |||
+ | |||
+ | 【二审】: | ||
== Reducing the Data Dimension 数据降维 == | == Reducing the Data Dimension 数据降维 == |