Principal Component Analysis(PCA) algorithm summary
- mean normalization(ensure every feature has sero mean)
- Sigma = 1/m∑(xi)(xi)T
- [U,S,V] = svd(Sigma)
- ureduce = u(:,1:K)
- Z = ureduce ' * X
Pick smallest value of k for which
∑ki=1 Sii / ∑i=mi=1 Sii >= 0.99 (99% of variance retained)