Algorithm |
- Mean center the data (optional)
|
- Compute the covariance matrix of the dimensions
|
- Find eigenvectors of covariance matrix
|
- Sort eigenvectors in decreasing order of eigenvalues
|
- Project onto eigenvectors in order
|
- Assume data matrix is
of size ![](images/img595.png)
|
- For each dimension, compute mean
![](images/image005.gif)
|
- Mean center
by subtracting from each column to get ![](images/img617.png)
|
- Compute covariance matrix
of size ![](images/img596.png)
|
|
- If mean centered,
![](images/img640.png)
|
- Find eigenvectors and corresponding eigenvalues
of ![](images/img500.png)
|
- Sort eigenvalues such that
![](images/img642.png)
|
- Project step-by-step onto the principal components
, etc.
|