Algorithm 1.
Principal component analysis (PCA)
Input: Sample set Low dimensional dimension n, Process: |
||
1: | Centralize all samples: | |
2: | Calculate the covariance matrix of sample: SST | |
3: | Solving the correlation coefficient matrix | |
4: | Solving the eigenvalues of the correlation coefficient matrix: | |
5: | Determine the number of principal components: m | |
6: | Calculate the corresponding eigenvector: | |
7: | Calculate principal components: | |