Re: [eigen] Machine precision<> too coarse

[ Thread Index | Date Index | More Archives ]

On Tue, Feb 3, 2009 at 8:59 AM, Benoit Jacob <jacob.benoit..1@xxxxxxxxx> wrote:
Also, look at things this way:

Suppose that you have a NxN matrix of doubles, with entries between -1
and 1, except in one row where entries are smaller than 1e-12.

For example (N=2):
1 0
0 1e-12

Do you want to consider this matrix invertible or not?

The condition number is bad, but the matrix is certainly invertible to machine precision.
* if you consider it invertible, there's a risk that the 1e-12 entries
were just noise and were meant to be zeros
* if you consider it non invertible, there's a risk that the 1e-12
entries were really precise and were not just noise around zero

There's no way to tell in general. This isn't math -- from the math
point of view, "invertibility" only makes sense if you have infinite
precision, because invertible matrices form a dense subset i.e. any
matrix can be approached arbitrarily closely by invertible ones.

Since this isn't math, what it is? It's just a matter of common sense.
A matrix like discussed here is probably just a noisy non-invertible
matrix. Moreover: since 1e-12 is already dangerously close to the
machine epsilon, it would be crazy for the user to rely on it being
considered invertible. Which means that we (Eigen) can expect the user
to NOT rely on this matrix being considered invertible. E.g. the user,
if he's sane, won't call inverse() on it.

Exactly. The user is the one who should make that choice. I have had cases where I was working near machine precision, and got slightly innaccurate results, but it was fine because I then pushed the values through a minimizer.

If the matrix library had set a too-coarse precision then I couldn't have done this.

Unfortunately floating point template parameters are not allowed in C++.
That's why i'm being liberal in taking a coarse precision.

On the issue of making new criterion per algorithm: I think this is important. At least for the Cholesky case, the criterion described in the paper gave good results empirically. I would be surprised if we can't find good stopping criterion in the literature for each of the major  algorithms.


Mail converted by MHonArc 2.6.19+