Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices*From*: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>*Date*: Wed, 24 Feb 2010 06:26:51 -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 :date:message-id:subject:from:to:content-type; bh=x0ftyfBnRpetkzNkwKQGuKnLcF9LKLOx1NmNpXUs/Jw=; b=Z7LIIkLWqenun1Wu1sv94O8DohvyZBXFrMlE8+bw5gbr4z90xTM3sYHwu5cjcDeqBS Qdtoa3bUGVY9ZTROLjTrhv/NmdyzPJg2Px7Bk4uVs14/+ppDh+AV0v7gkGQDr+bkPV38 SHwvmMRZVJN8CjpHTmrj1itw7EGm0jPS1SgPU=*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; b=tsZe0Muwr8DaWWHYCN8CpYLgpsdjDiIMQXMGFtokyaCIae0r6UOLbRk/ZE3HKeMD3B pNoZRLt2tXqlMSrNXZzhIQ2/OV98tH08tdG/grk3NQwSUpSuFgp37gLg61xgRFV+2gQT 40kTA3Apchy2KlayHI85NKolXLuveuh3Ies2g=

2010/2/24 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>: > Hi, > > note that the LDLT decomp does pivoting, so it is normal that you don't get > the same diagonal matrix. If you reconstruct the matrix from the decomp you > will see that in this case the decomp is correct. > > In the devel branch I've just added a reconstructedMatrix() to LDLT for that > precise purpose, so you can do: > > cout << (A - A_factored.reconstructedMatrix()) << endl; Good idea, but for homogeneity, we should then do that also for all other decompositions. Do you agree? Benoit > As a side note, > > A.diagonal().setOnes(); > > works as expected ;) (simpler than a home made for loop) > > gael. > > > On Wed, Feb 24, 2010 at 3:29 AM, Ben Goodrich <bgokgm@xxxxxxxxxxxxxx> wrote: >> >> Hi, >> >> I have found another robustness problem with ldlt() in the current >> development branch. Some combination of rank-deficiency, constant >> diagonal, pivoting, and double precision can make it impossible to >> roundtrip a matrix through the LDLt decomposition. I am attaching >> another test case that yields the output below. >> >> Thank you, >> Ben >> >> A = LDL' has a unit diagonal (apart from numerical noise) >> 1 >> 1 >> 1 >> 1 >> 1 >> This is a numerical disaster (compare the second cells). >> Here is the true D >> 1 >> 0.915092 >> 0 >> 0 >> 0 >> Here is the calculated D >> 1 >> 0.0785762 >> 2.01553e-16 >> 7.97973e-17 >> 1.39591e-15 >> This is good (because the diagonal of A is forced to have 1.0 in all its >> cells). >> Here is the true D >> 1 >> 0.915092 >> 0 >> 0 >> 0 >> Here is the calculated D >> 1 >> 0.915092 >> -6.06069e-16 >> -8.0296e-16 >> -8.4893e-16 > >

**Follow-Ups**:**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices***From:*Gael Guennebaud

**References**:**[eigen] [patch] LDLt decomposition with rank-deficient matrices***From:*Ben Goodrich

**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices***From:*Benoit Jacob

**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices***From:*Ben Goodrich

**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices***From:*Benoit Jacob

**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices***From:*Ben Goodrich

**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices** - Next by Date:
**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices** - Previous by thread:
**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices** - Next by thread:
**Re: [eigen] [patch] LDLt decomposition with rank-deficient matrices**

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