主成分分析

From Ufldl

Jump to: navigation, search
m
Line 82: Line 82:
variation of the data, and <math>\textstyle u_2</math> the secondary direction of variation:
variation of the data, and <math>\textstyle u_2</math> the secondary direction of variation:
-
【初译】:
+
【初译】:PCA算法的目的是为了选取一个数据投影的低维空间。从下图中可以看出,<math>\textstyle u_1</math>是数据变化的主方向,而<math>\textstyle u_2</math>是次方向。
【一审】:
【一审】:
Line 95: Line 95:
as follows:
as follows:
-
【初译】:
+
【初译】:也就是说,<math>\textstyle u_1</math>方向上的数据要比<math>\textstyle u_2</math>方向的变化大。为了计算出方向<math>\textstyle u_1</math>和<math>\textstyle u_2</math>,我们首先要通过如下式子计算出矩阵<math>\textstyle \Sigma</math>:
【一审】:
【一审】:
Line 113: Line 113:
-
【初译】:
+
【初译】:假设<math>\textstyle x</math>的均值为零,那么<math>\textstyle \Sigma</math>就是<math>\textstyle x</math>的协方差矩阵。(符号<math>\textstyle \Sigma</math>,读"Sigma",是协方差矩阵的表示符。虽然看起来与求和符号<math>\sum_{i=1}^n i</math>比较像,但他们是两个不同的概念。)由此可以得出,数据变化的主方向<math>\textstyle u_1</math>是协方差矩阵<math>\textstyle \Sigma</math>的主特征向量,而<math>\textstyle u_2</math>是次特征向量。
【一审】:
【一审】:
Line 122: Line 122:
【原文】:Note: If you are interested in seeing a more formal mathematical derivation/justification of this result, see the CS229 (Machine Learning) lecture notes on PCA (link at bottom of this page).  You won't need to do so to follow along this course, however.   
【原文】:Note: If you are interested in seeing a more formal mathematical derivation/justification of this result, see the CS229 (Machine Learning) lecture notes on PCA (link at bottom of this page).  You won't need to do so to follow along this course, however.   
-
【初译】:
+
【初译】:注意:如果你对这个结果更具体的数学推导过程感兴趣,可以参看CS229(机器学习)PCA部分的课件。如果仅仅是想跟上这门课程,可以不必如此。
【一审】:
【一审】:
Line 133: Line 133:
the eigenvectors in columns to form the matrix <math>\textstyle U</math>:
the eigenvectors in columns to form the matrix <math>\textstyle U</math>:
-
【初译】:
+
【初译】:特征向量可以通过专业的线性代数运算软件求得。计算出协方差矩阵<math>\textstyle \Sigma</math>的特征向量值后,排成列组成矩阵<math>\textstyle U</math>:
【一审】:
【一审】:
Line 153: Line 153:
Also, let <math>\textstyle \lambda_1, \lambda_2, \ldots, \lambda_n</math> be the corresponding eigenvalues.  
Also, let <math>\textstyle \lambda_1, \lambda_2, \ldots, \lambda_n</math> be the corresponding eigenvalues.  
-
【初译】:
+
【初译】:矩阵中<math>\textstyle u_1</math>是主特征向量(相应于最大的特征值),<math>\textstyle u_2</math>是次特征向量。以此类推,<math>\textstyle \lambda_1, \lambda_2, \ldots, \lambda_n</math>是相应的特征值。
【一审】:
【一审】:
Line 186: Line 186:
【初译】:因此,我们可以计算出以<math>\textstyle (u_1, u_2)</math>为基的<math>\textstyle x</math>的映射表示。
【初译】:因此,我们可以计算出以<math>\textstyle (u_1, u_2)</math>为基的<math>\textstyle x</math>的映射表示。
-
:<math>\begin{align}
+
:<math>\begin{align}
x_{\rm rot} = U^Tx = \begin{bmatrix} u_1^Tx \\ u_2^Tx \end{bmatrix}  
x_{\rm rot} = U^Tx = \begin{bmatrix} u_1^Tx \\ u_2^Tx \end{bmatrix}  
\end{align}</math>
\end{align}</math>

Revision as of 21:18, 11 March 2013

Personal tools