octave-maintainers
[Top][All Lists]
Advanced

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

Re: svds test failure


From: Daniel J Sebald
Subject: Re: svds test failure
Date: Tue, 31 Jul 2012 15:22:24 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 07/31/2012 03:04 PM, Rik wrote:
On 07/31/2012 11:26 AM, Daniel J Sebald wrote:
[snip]
%!testif HAVE_ARPACK
%! s = svds (speye (10));
%! assert (s, ones (6, 1), 2*eps);

To expect a numerical routine to be accurate within two times the
machine precision is asking for quite a bit.  The tests which have
'opts' passed in are asking for accuracy within 1e-10, which seems more
reasonable.
The special case of the identity matrix and a matrix of all zeros are just
that -- special cases.  ARPACK should be able in these instances to arrive
at a nearly exact solution.

The identity matrix probably isn't a special case. I mean, theoretically identity matrix is special, but algorithm wise ARPACK probably proceeds the same as other matrices until the stopping criteria is met.

In the case of the zero matrix I would guess that ARPACK proceeds by trying to diagonalize some matrix using a rotation of sorts, but because the sum of any terms (be they the diagonal) turns out to be zero the algorithm likely stops right away because of some potential division by zero in the rotation algorithm.


I realize one would expect the result to be deterministic and not fail
in one case and pass in the other, but who knows how ARPACK is set up?
From what I can tell from the API, ARPACK chooses a random initial seed
ONLY if a seed is not provided to them.  Other than this, the algorithm is
deterministic.

That would explain the result from my followup post on the identity matrix randomness.

Dan


reply via email to

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