Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 19 Jul 2010 09:51:53 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=rzAnnPNR/JgaxzG6He1RlYUr0FtoXLwZQf+Nfarhk+M=; b=A6e72JKVp9uRVnqEkpOqwZCTOuvhR2l7A+cKiLUFBMsOJ8wtQI+5dm8b4IwSLJfMBO oYXrA03zloGBgmvZPEIFKxZqo9asFyVsAI0AZ14UOVUvYv9I6Xp8JO4D0+ccfJuVzPNb GMnoOvr9w3PykZraJlsR9gTxMKJPfe6HoncXg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=P2i3kGRRp5agYsdN7qE9bcLLMqejEaS/IEJ47OaKEPkdO5uJmH1OXnq6IDRG1bMk5B 5MIAXZtECx0EDHIe6BMQRigcZlSO4IdIgmN5yJd6WbNiodRRufs4fbbMzryG8ILty2y5 Hzr/abNlyUed3wpoZIi2sSN+50V+3rq7oky6A=
2010/7/19 Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx>:
> On 07/18/10 00:32:26, Benoit Jacob wrote:
>> 2010/7/17 Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx>:
>> > 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,
>>
>> If (lhs * solution - rhs) is small compared to rhs, then what more
>> could you ask for?
>
> A lot more!
> A linear equation A x = b is a mathematical problem.
> If it has a solution the users wants an approximation to that.
> If I find a vector x which satisfies norm(A*x-b) = tiny in finite
> arithmetic, that doesn't say much about norm(x_computed - x_true)
> unless I have a bound on the condition number.
I see,
x = A^{-1} A x ~= A^{-1} b
so what you need to conclude how accurate x is, is a bound on the norm
of A^{-1} which is closely related to certain notions of condition
number.
OK, that makes sense. Good point!
Benoit