PCA is a linear dimensionality reduction method:
linearly correlated variables data linearly uncorrelated variables data
These linearly uncorrelated variables are the principal components, they keep the most of infomation from the original data representation but has been compressed and de-dimensioned.
Simplify, in 2D → 1D PCA example, the goal of the algorithm is to find a best line (principal component) to represent the 2D points into a single number with the largest variance.
Unknown block type: link_preview
Unknown block type: link_preview
As the PCA algorithm has been implemented and optimised by engineerers before, the computation can be done directly with the help of Sklearn
, etc., learning its mathematical principles and properties are optional.
compute eigenvalues and correspounding unit eigenvectors to construct the orthogonal matrices:
result into a principal component matrix .
do SVD on matrix and keep singular values and vectors:
each column of is correspounding to a principal component, result into a principal component matrix .