Randomized SVD

Randomized SVD is a really cute technique for computing the SVD of a large scale matrix. It proceeds as follows: Consider Am x n be the large matrix. Let Qm x k k << n be an orthogonal matrix with k orthonormal columns. We know QQT = I
A can thus be rewritten as -
A ≈ QQTA
The first step is to compute the SVD of B=QTA. As B k x n is much smaller, the SVD of B can be computed using standard methods and is B = SΣVT. Now plugging this back we have A = QSΣVT which becomes the SVD of A with U = QS. The challenge here is constructing the orthogonal matrix Q efficiently. This is done as follows: Compute a Gaussian random matrix Ωn x k. Compute Ym x k = AΩ. Compute the QR decomposition of Y to get the orthonormal matrix Q. The matlab code is as follows:
O = randn(n, k);
Y = A*O;
[Q, R] = qr(Y, 0);
B = Q'*A;
[S sigma V] = svd(B);
U = Q*S;

Comments

Popular posts from this blog

MinHash, Bloom Filters and LSH

Perceptron Algorithm

Logistic Regression