This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
private:writeups:svd [2020/10/18 19:48] admin |
private:writeups:svd [2020/10/18 21:25] (current) admin |
||
|---|---|---|---|
| Line 39: | Line 39: | ||
| - | U and V are the eigenvectors of the correlation matrices,$X X^T$ and $X^T X$, respectively. | + | U and V are the eigenvectors of the correlation matrices,$X X^T$ and $X^T X$, respectively. |
| + | |||
| + | ====== Principal component analysis (PCA) ====== | ||
| + | This is the statistical interpretation of SVD. | ||
| + | |||
| + | PCA finds elipsoids (depending on dimensionality) that account for the largest, second largest, etc. variance in your data. | ||
| + | |||
| + | Note that X is defined differently as a matrix of horizontally aligned matrix (instead of vertical). | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Steps. | ||
| + | 1. Compute mean row, X' | ||
| + | 2. Subtract mean from X. $B=X-X' | ||
| + | 3. Calc covariance matrix, $C=B^T B$ | ||
| + | 4. Computer eigs of C. Eigenvectors, | ||
| + | 5. Principal components, T=BV. (V also called " | ||
| + | If $B=U \Sigma V^T$, then $T=U \Sigma$. | ||
| + | |||
| + | Takeaway, PCA can be found by saving the SVD of (X minus its row-mean). | ||
| + | |||
| + | |||
| + | ====== Least squares, regression, and pseudo-inverse ====== | ||
| + | |||
| + | SVD allows us to generalized Ax=b to non-square A matrices. | ||