SVD, pseudoinverse, and PCA: SVD: singular value decomposition
PCA: Principal Component Analysis
Suppose that we observe \(n\) variables \(X_1,\ldots, X_n\) and collect \(N\) data for each variable \(X_i\). We assume for convenience that the average for each variable is zero (otherwise we subtract the average of the measured quantity) We put this information in an \(N\times n\) matrix \(X=(x_{ij})_{i=1,\ldots N;\; j=1\ldots n}\). Then the covariance matrix \(C\) is a symmetrical \(n\times n\) matrix that can be written as \[C=\frac{1}{N-1}X^{\top}\!X\] In Principal Component Analysis, abbreviated PCA,we try to find a linear transformation of the variables \(X_1,\ldots, X_n\) into new variables \(Y_1,\ldots, Y_n\) so that the transformed data are uncorrelated. This can be achieved by determining the eigenvectors of the correlation matrix \(C\).
The first principal component of the data is the eigenvector with the largest eigenvalue.
The second principal component of the data is the eigenvector with the second largest eigenvalue.
And so on
The first principal component has the greatest variance; the second principal component having the second largest variance; and so on.
Instead of considering all variables you can describe the data in more compact way by using only the space spanned by the first few components of the covariance matrix.
Computation of principal components is usually carried out by means of the singular value decomposition.