Machine Learing by Andrew Ng --- PCA

U can use PCA to speed up your learning algorithm,but before it ,U’d better to run your learning algorithm with no PCA first(This is What Andrew Ng said).And U can also compress data by using PCA.amazing!
PCA is actually an algorithm to reduce your features,also say Dimensionality Reduction.

steps:

  • Feature Normalization.
  • Computing the covariance matrix of the data.
  • Using the build-in function ’ svd ’ to obtain U and S(i.e. [U,S,V]=svd(Sigma),Sigma is the covariance matrix we hava computed previously)
  • Projecting data.(with U and S)
  • U is a n by n matrix (n is the original number of the data’features)
  • More important things already mentioned in the lecture notes.

My solution:

Machine Learing by Andrew Ng --- PCA_第1张图片
Machine Learing by Andrew Ng --- PCA_第2张图片
Machine Learing by Andrew Ng --- PCA_第3张图片

你可能感兴趣的:(Data)