From PCA to RPCA
PCA is widely known by its geometric interpretation.
That is, finding successive orthonormal vectors to project the data onto, such that the reprojected variance is kept at a maximum.
Here is another way to look at PCA.
Let’s say you have a data matrix
This can be formulated as an optimization problem, where you try to find a matrix
Note that low-rank translates into the fact that there are correlations among samples and/or features.
This ties our story back to the geometric interpretation of PCA.
The solution to this problem is outliend by the famous Eckart-Young-Mirsky theorem, and is well-implemented in commonly used machine learning packages such as scikit-learn
.
It’s easy to solve whether you use SVD, as the original thorem suggests, or solving the eigenproblem of the covariance matrix of the data.
Something we haven’t talked about yet is the term
But what if it wasn’t?
Candes et al. raise this question in their 2011 paper.
In their own words, if the data is grossly corrupted in sparse regions, then
Rank minimization over a convex set is an NP-hard problem therefore it’s not practical.
What Candes et al. suggests is to replace
Nuclear norm uses the 1-norm, which is the tightest convex relaxation of the 0-“norm”,
Consequently, our minimaztion problem becomes a convex optimization problem:
This problem defines what we call today, robust PCA. It can be solved efficiently via Alternating Direction Method of Multipliers (ADMM).
We saved the best question to the last: why would you want to use robust PCA for?
While there are many applications one can think of, I find background-foreground separation in video surveillance to be the easiest to imagine.
If frames captured by our camera is stored in a matrix
Robust PCA in Action
I grabbed the first few seconds following royalty free airport camera footage from YouTube.
It fits my definition above, since the camera is fixed at a location and it doesn’t rotate around. There are a few sparse objects moving around.

By applying robust PCA, I could easily separate background from the moving object (in this case, the truck and a couple of planes to the very right of the frame through the end of the video).

Had we have done it with PCA? Well…


I guess it’s good for making viral ghost footage videos.