Re: [eigen] JacobiSVD with nearly rank-deficient matrix

[ Thread Index | Date Index | More Archives ]

2011/2/12 Jim Bosch <talljimbo@xxxxxxxxx>:
> On 02/12/2011 10:32 AM, Benoit Jacob wrote:
>> I understand that LAPACK cuts off very small singular values, but I
>> don't think that we should do the same in Eigen. The algorithm that
>> LAPACK uses makes these small singular values very unreliable, but the
>> same is not true with our algorithm.
>> There are many different notions of "goodness/badness" tests of
>> solutions, depending on your use cases, and the path we've chosen in
>> Eigen is to let the user perform his own tests, like in the example
>> program above where I compute the relative error on the right-hand
>> side.
> There are times when one doesn't trust the values one has fed into the SVD
> algorithm well enough to trust such small eigenvalues either, regardless of
> the reliability of the algorithm.  I have to admit I also never use Eigen's
> SVD::solve routines, because I always wrap the SVD in something that imposes
> a cutoff on small singular values as well, so I'd love to see an option to
> supply such a cutoff to solve, even if it defaults to zero.
> That said, if Eigen's philosophy is that such tests should take place
> outside Eigen, I can certainly accept that.

OK, my earlier email was a bit rushed.

Tests of the form "is this solution good" should take place outside of
Eigen because only the user knows what criteria he wants to use there;
but if one wants to cut off small eigenvalues, then indeed this needs
to be done inside Eigen.

Looking at the singular values in this case:

singular vals

I admit that in this case there is at least one cut-off that we should
probably perform: the small singular value here is indeed smaller than
epsilon*biggest, so indeed it is just noise. Indeed, a relative error
of epsilon in the source matrix could cause a bigger difference here.
I admit that in this case we should cut it off to zero.

So indeed, we should introduce a cut-off for small singular values,
and let it default to at most machine epsilon times the biggest
singular value.


> Jim

Mail converted by MHonArc 2.6.19+