- The Gram Matrix
X and it’s transpose, Wikipedia Gram Matrix
The matrix outputted will be symmetric
Most intuitively, it is calculating the unscaled covariance matrix between features
- To get the actual covariance matrix:
- Center the date - Subtract the mean of each feature from each sample
- Compute
, where is the centered data matrix - Divide by
| Expression | Matrix Size | Interpretation assuming proper scaling |
|---|---|---|
| Covariance between features | ||
| Similarity between samples |
- Given
Use Cases
- Linear Regression -
- Equivalent to OLS (ordinary least squares regression), in the condition that
is invertible
- PCA - Computes eigenvectors of
- SVMs - Kernels use it?
- LDA -
What is it doing?
Resources
So many answers I can’t really understand right now, but here’s a list of some: