Apex › Storage & databases

How PCA compresses data (principal components)

Find the directions data actually spreads along, so you can keep the important ones and drop the rest. The first principal component is the direction of maximum variance — which is exactly the top eigenvector of the covariance matrix; the second is perpendicular. Rotating into that basis and dropping the small axes is the linear projection that loses the least information. Verified three ways (brute-force angle search, analytic eigenvector, power iteration all agree). Rotate the axis and watch the projected variance peak at PC1.

More in Storage & databases