Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pseudoinverse of a sparse matrix

1,089 views
Skip to first unread message

Lifei Zhang

unread,
Jan 21, 2002, 8:32:40 AM1/21/02
to
Hi.


I want to get the pseudoinverse of a sparse matrix.But the function
pinv() in matlab only works well for full matrix.Seemly, It is not a
good idea for converting sparse matrix to full matrix. Anyone knows
better idea for this task?


thanks a lot.

John D'Errico

unread,
Jan 21, 2002, 10:17:25 AM1/21/02
to
I'll guess that the inverse in any incarnation,
pseudo or not, will probably be full. Assuming
you really do want to compute it, but must avoid
because of time or memory consumed by pinv, which
must compute the svd of your matrix, then there
is an alternative.

An alternative pseudo-inverse can be derived
from a QR. Assume your matrix is A. Then it is
easy enough to show that

P = inv(A'*A)*A'

has the right properties (see help for pinv.)
I do not recommend using this expression to
compute the pseudo-inverse though.

Instead, form the q-less QR decomposition of A.

r = qr(A,0);

A was sparse, so will be r.

Then form a pseudo-inverse by essentially
substituting for A in the expression for P
above. It will reduce to:

P=r\(r'\A');

A sparsely computable form of the pseudo-inverse.
Is it as well-behaved as the SVD form of the
pseudo-inverse? No. It might do in a pinch
though.

Cleve or Penny might want to step in here to
clarify the differences.

HTH,
John D'Errico


In article <eea98...@WebX.raydaftYaTP>, "Lifei Zhang"
<shifei...@yahoo.com> wrote:

--

lifei zhang

unread,
Jan 21, 2002, 9:45:44 PM1/21/02
to
Thanks.


According to your idea, I have got the satisfactory result. Also,
based on your opion, I learned a lot about the matrix inverxe.


Thanks again.

Brian Borchers

unread,
Jan 21, 2002, 12:53:24 PM1/21/02
to

The pseudoinverse of a sparse matrix will typically be fully dense.
Depending on the size of your matrix it may not be practical to store
the full pseudo-inverse.

Do you really need the pseudo-inverse matrix? Or do you really want to
use the pseudo-inverse to find a minimum norm least squares solution?

If you really just want to find a least squares solution, then
iterative methods for the least squares problem (CGLS or LSQR) might
be appropriate.

--
Brian Borchers borc...@nmt.edu
Department of Mathematics http://www.nmt.edu/~borchers/
New Mexico Tech Phone: 505-835-5813
Socorro, NM 87801 FAX: 505-835-5366

0 new messages