I want to compute the Generalized Singular Value Decomposition for sparse matrices with a size of up to 1000000 x 1000000 (not necessarily square). The method is going to be used in machine learning (classification).
Currently I'm using the function ggsvd (here) from the LAPACK package which is a Fortran implementation.
What it does is computing matrices U, V, X, C, S for given matrices A and B such that
A = U * C * transposed(X)
B = V * S * transposed(X)
where C and S are diagonal matrices containing the singular values of A and B respective. (Explanation from Matlab)
With SVD one can do a low-rank approximation meaning that only the r largest singular values with most information are being computed to approximate the input matrix.
I am now wondering if this is also possible in the GSVD so that not all the singular values have to be computed. I would like to compute only the r largest values or to stop computing when a value is below a given threshold.
My assumption is that it's not possible because the singular values of A and B are computed pairwise and if a pair contains the largest singular value of A its mate of B doesn't have to be necessarily.
A short explanation why it is possible (and maybe a link to an implementation that offers this option) or not would be very nice.
ggsvd
computes the generalized svd in a different form with respect to the one presented in matlab, see the lug. $\endgroup$gsvd
, the generalized singular values are defined assqrt(diag(C'*C)./diag(S'*S))
(or $\alpha_i / \beta_i$ with reference to the lug.) It is therefore possible to define the largest singular values. If those are useful for a low rank approx, it depends on your application, and also on the structure of your problem: which are the sizes and ranks of $A$ and $B$? $\endgroup$