Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0 |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
On Sat, 17 Jul 2010, Benoit Jacob wrote:
Another reason why we decided not to expose condition numbers in Eigen is that for the main purpose they're used for, namely checking if a result is reliable, there is a better approach which is: check the result itself. For example, if you want to check how accurate your matrix inverse is, just compute matrix*inverse and see how close it is to the identity matrix. Nothing beats that! When it comes to more general solving with potentially non full rank matrices, this is even better, because the condition number of the lhs matrix alone doesn't tell all you need to know (it also depends on your particular rhs), so the approach we're recommending in Eigen, to compute lhs*solution and compare with rhs, is the only way to know for sure how good your solution is.
I'm not sure I agree. The residual (lhs * solution - rhs) is certainly useful, but so is the condition number (norm of A multiplied by norm of A^{-1}, where I deliberately don't specify the norm used). If the residual is zero but the condition number is huge then you probably should not trust the solution, because even though Eigen may have found the exact solution to the problem you gave it, it is likely that the lhs and rhs that you gave to Eigen are not quite exact, and these errors are magnified hugely (in fact, if the condition number is huge then you probably cannot even reliably compute the residual).
This implies (if correct) that it is useful to have Eigen compute estimates for the condition number. The operative word here is 'estimate': I think the order of magnitude is what is usually important, not the exact value.
Cheers, Jitse
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |