[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44061] U and V result matrices from svds are

From: Marco Caliari
Subject: [Octave-bug-tracker] [bug #44061] U and V result matrices from svds are not othogonal
Date: Thu, 05 Feb 2015 09:01:10 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0

Follow-up Comment #8, bug #44061 (project octave):


I think your patch should be modified, since when tmp is a number, tolower
(tmp) is not defined (at least, if I try tolower(4) I see a strange symbol).

Coming back to the original bug, I have an explanation (but not yet a fix). If
you call A the original matrix and try

[V,s] = eigs([sparse(4,4),A;A',sparse(4,4)],8)

you see four eigenvectors relative to 0, two of them with the last four
entries 0. When you ask for 4 singular values of A, close to 4, you get the
eigenvectors relative to 2 and two of the eigenvectors relative to 0,
precisely the two with the last four entries 0. Try


to see it. This is precisely the command used in svds.
This is the problem, since the last entries are used to build the orthogonal
matrix V. Here we get these two eigenvectors because if rows(A)<9, eigs calls
eig (see call_eig in eigs.m). If eigs would call ARPACK, since it is an
iterative method based on a random initial vector, you would (almost) never
see such two vectors, but rather two "random" vectors spanned by the four
eingenvectors relative to 0. This is a case in which a random initialization
helps you. A second problem is that these two vectors, although orthogonal,
are not orthognal when split into two parts. Then, you need to orthogonalize
the two parts. I attached a script to demonstrate this second point.

(file #32999)

Additional Item Attachment:

File name: script.m                       Size:0 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]