PCA(Principal Component Analysis) 是一种常见的数据分析方式,常用于高维数据的降维,可用于提取数据的主要特征分量。
首先介绍一些关于线性降维的基本思想,用于线性PCA的实现。在文章后半部分会总结非线性PCA的实现方法,即Kernel PCA。
Linear PCA
Linear dimensionality reduction
Dimentionality reduction
Map the dataset with dimension d to the dataset with dimension k, and d > k.
x = ( x 1 ⋮ x d ) d × 1 → ( y ^ 1 ⋮ y ^ k ) k × 1 = y ^ , k ⩽ d x = \begin{pmatrix} x_{1}\\ \vdots \\ x_{d} \end{pmatrix}_{d \times 1} \rightarrow \begin{pmatrix} \hat{y}_{1}\\ \vdots \\ \hat{y}_{k} \end{pmatrix}_{k \times 1} = \hat{y}, \ k \leqslant d x=⎝⎜⎛x1⋮xd⎠⎟⎞d×1→⎝⎜⎛y^1⋮y^k⎠⎟⎞k×1=y^, k⩽d
Linear Encoding / Embedding
y ^ = b + W T x b = ( b 1 ⋮ b k ) k × 1 W = ( ∣ . . . ∣ w 1 . . . w k ∣ . . . ∣ ) d × k \hat{y} = b + W^{T}x \newline b = \begin{pmatrix} b_{1} \\ \vdots \\ b_{k} \end{pmatrix}_{k \times 1} \ \ \ W = \begin{pmatrix} | & ...& | \\ w_{1} & ... &w_{k} \\ | &... & | \end{pmatrix} _{d \times k} y^=b+WTxb=⎝⎜⎛b1⋮bk⎠⎟⎞k×1 W=⎝⎛∣w1∣.........∣wk∣⎠⎞d×k
将 X 数据集使用线性关系映射到 Y上,使维度降低。
Linear Decoding / Reconstruction
y ^ = ( y ^ 1 ⋮ y ^ k ) k × 1 → ( x ^ 1 ⋮ x ^ d ) d × 1 = x ^ , d ⩾ k \hat{y} = \begin{pmatrix} \hat{y}_{1} \\ \vdots \\ \hat{y}_{k} \end{pmatrix}_{k \times 1} \rightarrow \begin{pmatrix} \hat{x}_{1} \\ \vdots \\ \hat{x}_{d} \end{pmatrix}_{d \times 1} = \hat{\bold{x}}, \ \ d \geqslant k y^=⎝⎜⎛y^1⋮y^