[eigen] Precision in Cholesky Decomposition |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Precision in Cholesky Decomposition
- From: Scott Stephens <stephens.js@xxxxxxxxx>
- Date: Mon, 8 Jun 2009 08:50:33 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=fsj/hCPkTQNmwhjU6Kd6o9BFI8PHt8T9ZH+UDVk0S78=; b=ixHT+Xof52Bw0XRLj3knBZ/Dcikt09COQWZHxFyWknM+/UuTxq+L3QCEdEN3AnQAbS G1Ss1FNAOLKArxTxtYm9qFG2Ree6LfoH9JysGgfuHNyiMhPgB5u+a2aM7nPjbM0AnJYH bBKQ3SAZax3MrBHpxxsnq9Jwlq/l0f+/snEOw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=DyXOWBtKPSOw+YRkggF+xn2b45gnwaFYA0n5pRa0S/bfqmfAvwiIaGSuU5VHv5eng0 o/8ZgzB0WC7p2xUnQo0+OYWbp+c9vknzQgs5ca9mkq54Ft7IkSNBgb0AziMel2n6YnUc 3hWk/NI0HUYNsvuWZ/dXTBr9P9jmt6neF0BPA=
I was having a problem with a Cholesky decomposition failing with the
indication that the matrix was not positive definite. I was surprised
because I was able to successfully perform the Cholesky decomposition
in MATLAB. I tracked this down to the value returned by
precision<double>() as defined in src/Core/MathFunctions.h, the square
root of which is being used as the cut-off for numerically equivalent
to zero in the LLT code. The return value is hard-coded to 1e-11; I
was able to match MATLAB by setting this to 1e-18 instead.
Is there a particular reason 1e-11 was chosen for this value? Would
it make sense to go with a smaller value by default, or at least offer
the ability to configure this number as part of the LLT interface? Or
is there a better way for me to solve this problem? (Maybe some kind
of scaling before the decomposition, then rescaling when I'm done?)
Thanks,
Scott