1. Task of PCA

Find a direction and project all points to that line, thus minimizing the projection error.
Projection error: Sum of distances between points and line

2. Data Preprocessing

Feature Scaling + Mean Normalization
机器学习笔记 ---- Principal Component Analysis

3. PCA Algorithm

机器学习笔记 ---- Principal Component Analysis

Using the first k vectors in U and denote it as Ur , the result is Z=UrTX

4. Reconstruction from PCA


Xapprox=UrZ

5. How to Choose the Reduced Dimension

机器学习笔记 ---- Principal Component Analysis

Using S=diag(s1...sn), Check whether

1i=1ksii=1nsi<=0.01

—– an O(n) Algorithm

6. Speed Up Supervised Learning by PCA

Train the model using data compressed by PCA
Note: Running PCA which only depends on TRAINING SET when training!
While this mapping can be applied to other sets.

Only use PCA when the original data perform badly on your system!

相关文章: