Week 6 Lecture 1
Principal Component Analysis
- How to reduce to variables, such that as much information is preserved as possible?
- How many dimensions are required to capture a certain percentage of information?
Orthogonal matrix (iff. basis is orthonormal):
Semi-orthogonal: orthonormal in the lowest dimension
Semi-orthogonal matrices are semi-unitary:
Eigenvectors and Eigenvalues
We only care about Eigenvectors of unit length, and with the following ordering:
Eigencomposition of real symmetric matrix
For a real symmetric matrix , the decomposition is:
Where:
- is orthogonal
- where are the eithervalues
- The columns of are corresponding eigenvectors
Singular value decomposition
For any(!) matrix :
for
- Semi-orthogonal
- with
- Semi-orthogonal
are NOT the eigenvectors!!! They are the singular values
PCA
Basic idea is to find an affine linear function that can map back to the datasetβs dimention as accurately as possible. (by selecting a smaller as input dimension)
The linear functionβs coefficient has pairwise orthogonal columns, all unit length
Reconstruction error is calculated by a sum-of-squares error
Formal goal is to find affine model and projected data points that minimizes sum-of-squares
Solution
For the bias, use the empirical mean of the data points
Datapoints should be encoded as:
The vector is made out of the first eigenvectors of the data covariance matrix (S):
PCA assumes our distribution is Gaussian.
In short, PCA is a heuristic to not care about all the features, but the rest should be normalized for most algorithms