Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

SVD with only a few right singular vectors

mboisson
Beginner
274 Views
Hello,
I am trying to compute the SVD of a big matrix. However, I am only interrested in a given number (N) of right singular vectors associated to the N smallest singular values.

The driver routine seems to be able only to compute all of them. I think it might be possible to do what I want using gebrd, bdsqr, ungbr and unmbr, but I can't figure out the propre chain of call and parameters.

So, I figured out that I first need to call gebrd, which reduces A = Q B P^\dag, but does not return Q and P (rather returns "info" on them, whatever that means). Then, I think I need to call ungbr to generate P. Am I right ? If so, how can I generate only the part of P which will be usefull for the N singular vectors associated to the N smallest singular values ?

Then, I think I would need to call bdsqr. But what is the U and V matrix that I must send as input ? Are these effectively the Q and P computer by ungbr ?

Please help me clarify all of this. If you have an example of code doing this, it would be even better!
0 Kudos
1 Reply
Michael_C_Intel4
Employee
274 Views
Quoting - mboisson
Hello,
I am trying to compute the SVD of a big matrix. However, I am only interrested in a given number (N) of right singular vectors associated to the N smallest singular values.

The driver routine seems to be able only to compute all of them. I think it might be possible to do what I want using gebrd, bdsqr, ungbr and unmbr, but I can't figure out the propre chain of call and parameters.

So, I figured out that I first need to call gebrd, which reduces A = Q B P^dag, but does not return Q and P (rather returns "info" on them, whatever that means). Then, I think I need to call ungbr to generate P. Am I right ? If so, how can I generate only the part of P which will be usefull for the N singular vectors associated to the N smallest singular values ?

Then, I think I would need to call bdsqr. But what is the U and V matrix that I must send as input ? Are these effectively the Q and P computer by ungbr ?

Please help me clarify all of this. If you have an example of code doing this, it would be even better!

Hello,

I'm afraid you won't be able to compute only a part of singular vectors by means of gebrd, ungbr and bdsqr. bdsqr can't work on selected singular vectors - it can work on several first components of all singular vectors. The problem is that bdsqr doesn't know the position of the singular values in advance and need to sort all of them in the end, so the singular vectorsneed to be sorted also, and we couldn't make this operation if we didn't have the full vector set.

Potentially, you could operate on selected singular vectors only if you knew the exact position of the corresponding singular values, but it's not about bdsqr. Sorry, that's not possible with the current functionality set.

Michael.
0 Kudos
Reply