Principle Component Analysis (PCA)
Principle Component Analysis (PCA) is a basic technique for dimension reduction of data. PCA can be derived in various ways and the one we introduce here is maximum variance formulation.
Assume we are given 2-dimensional data. If we want to visualize data in 1 dimension, it would be reasonable to project the data to the direction (vector) where the variance of projected data maximizes in order to distinguish data points well.
Assume we have a set of data points where . Our objective is to find the directions that maximize the variance of projected data. Let be one of the directions. Then the projected data would be
The variance of the projected data is going to be
where and . We also constrain to be since we only need the direction of the projected space. We optimize the variance formulation with the constraint by using Lagrange multiplier. We define the Lagrangian function as follow.
After solving the objective function by setting the gradient to zero, we have the following well-known equation.
The problem of finding the direction which makes the projected data has largest variance turns out to be equal to finding the eigenvector which has the largest eigenvalue since . If we want to have multiple directions, the rest of the directions can be found by ordering magnitude of eigenvalues.
Comments