Re: [eigen] Positive Definitenes? |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Positive Definitenes?*From*: Gabriel <gabrielvc@xxxxxxxxx>*Date*: Sun, 7 Mar 2010 16:08:38 -0500*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=I+vk+cULzFsrkRY8aH9T15GHxPLvFOvTluoaaMTYfGQ=; b=V6rdCVJFNcjk+GIvwK4P3MxFX25t0iOs2jCMBFboeHN6usIAMdeex8fiHuVrpQIhvS Q2NK2Asfd7AwtBNV4ubq9bMXTB54+tikifvQkWiOzgIsh/PlRSay3pgVokW9fTpIX/U5 H0JJIOjJdA5vcc4IwusUlDq7OCG9oTafhi5Xw=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=r4RMmE9Jm5qa9XqoO17Cuj8pqXOGqiMFF+XwFvSo2S53eP+aCpGwwOguLqdrjb2EU5 3MQgXojWl740r6OfhRoufuMrO/EuIMV1bnByPeMP5baDGroXW5F3bxskFoWw2PflXO8y GnOPEwMAQgXdcU6xCDo5wW0+a3PuwArm8MaRE=

Thanks, Benoit.

G

On Thu, Mar 4, 2010 at 11:17 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:

2010/3/4 Gabriel <gabrielvc@xxxxxxxxxx>:

> Thanks for your answers, I will check the approaches to check forIt's not all-or-nothing: if you try to feed an indefinite matrix to an

> efficiency. This operation would have to be done several times, and I do

> need to solve a matrix equation K x = b, with K the matrix, and b a known

> vector, and this is done a lot of times.

>

> Is there an error handler implemented? In my code this operation is

> performed hundreds of times and I would need to automatize some sort of

> workaround when the matrix is not positive definite. This would signal an

> error in my code, my matrices have to bee p.d. all the time, so I would

> implement something to forget the systems in which p.d. gets "lost".

algorithm that requires definite matrices, it typically won't be able

to tell you that the matrix is indefinite, instead in many cases it

will just be very inaccurate without being able to reliably report an

error. So, to answer your question, no such error reporting is made by

Eigen, but that's because it's impossible to implement correctly.

Benoit

>

> Gabriel

>

>

>

> On Wed, Mar 3, 2010 at 6:56 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>

> wrote:

>>

>> 2010/3/3 Cyril Flaig <cflaig@xxxxxxxxxxx>:

>> > On 2010-03-02 19:27, Benoit Jacob wrote:

>> >> 2010/3/2 Cyril Flaig <cflaig@xxxxxxxxxxx>:

>> >>> The Cholesky decomposition works only if the matrix is positive

>> >>> definite. If the decomposition fails then eigen sets a

>> >>> m_isPositiveDefinite to false, doesn't it?

>> >>>

>> >>> Or is this deprecated and not used in the new version?

>> >>

>> >> This is deprecated indeed.

>> >

>> > As far as I know. The fastest way to determine the postive definitnes is

>> > to check the diagonal if all entries are >=0.

>>

>> This is indeed a necessary condition for positiveness.

>>

>> > If this is true then

>> > attempt a Cholesky decomposition. If it exists then the matrix is

>> > positive definite.

>>

>> The problem with this approach is that it's an all-or-nothing test

>> that one has to perform at the time of the decomposition itself.

>> Making this useful in practice would require us to let the user pass a

>> choice of a threshold at the time of the decomposition itself (so an

>> API change) and even then, that would be pretty bad as, if the user

>> passes a higher threshold, he compromises the accuracy of a subsequent

>> solve(). So this forces a compromise between the invertibility check

>> and the precision of solve().

>>

>> Benoit

>>

>> >

>> > -cyril

>> >

>> >

>>

>>

>

>

>

> --

> ==============

> = Gabriel Villalobos,

> = Candidato a Doctor en Ciencias - Física, UN

> = M.Sc. Physics, Georgia Institute of Technology

> = Físico, Universidad Nacional de Colombia

> = Tel. Oficina. (571) 3165000 - 13031

> = gvillalobosc@xxxxxxxxxxxxxx

> = Enamoradamente Casado

> ===============

> = Acuerdos Toltecas:

> = * Hacer siempre y en todo asunto nuestro mejor

> = esfuerzo,

> = * Ser impecable con la palabra

> = * No suponer

> = * No tomarse nada a título personal

> ==============

>

>

>

>

--

==============

= Gabriel Villalobos,

= Candidato a Doctor en Ciencias - Física, UN

= M.Sc. Physics, Georgia Institute of Technology

= Físico, Universidad Nacional de Colombia

= Tel. Oficina. (571) 3165000 - 13031

= gvillalobosc@xxxxxxxxxxxxxx

= Enamoradamente Casado

===============

= Acuerdos Toltecas:

= * Hacer siempre y en todo asunto nuestro mejor

= esfuerzo,

= * Ser impecable con la palabra

= * No suponer

= * No tomarse nada a título personal

==============

**References**:**[eigen] Positive Definitenes?***From:*Gabriel

**Re: [eigen] Positive Definitenes?***From:*Benoit Jacob

**Re: [eigen] Positive Definitenes?***From:*Cyril Flaig

**Re: [eigen] Positive Definitenes?***From:*Benoit Jacob

**Re: [eigen] Positive Definitenes?***From:*Cyril Flaig

**Re: [eigen] Positive Definitenes?***From:*Benoit Jacob

**Re: [eigen] Positive Definitenes?***From:*Gabriel

**Re: [eigen] Positive Definitenes?***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Progress and plans** - Next by Date:
**Re: [eigen] anybody interested in being the new 2.0 release dude?** - Previous by thread:
**Re: [eigen] Positive Definitenes?** - Next by thread:
**[eigen] About performance with 3-double vectors and self written library**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |