You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to compute the cholesky factorization of A'BA , Julia produces a PosDefException: matrix is not Hermitian; I suppose the reason for this error is caused by a numerical roundness issue obtained while computing the product of these matrices.
using LinearAlgebra
A = rand(n,n);
C = rand(n,n);
B = C'*C; #B is symmetric a
AtBA = A'*B*A;
# NOT WORKING :
cholesky(AtBA)
# WORKING :
LinearAlgebra.LAPACK.potrf!('U',AtBA)
I believe this is a similar issue as the one mentioned in issue #28885 where it is said that this "feature" is desired to be kept like this. However, it would be nice to have this inaccuracy caused issue mentioned in the documentation for the cholesky/isposdef/ishermitian calls since newcomers to the Julia language might be confused why their theoretically posdef matrix cannot be factorized using cholesky in Julia unless using other tricks such as using the potrf call from the LAPACK library.
versioninfo()
Julia Version 1.1.1
Commit 55e36cc (2019-05-16 04:10 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin15.6.0)
CPU: Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
The text was updated successfully, but these errors were encountered:
When trying to compute the cholesky factorization of A'BA , Julia produces a PosDefException: matrix is not Hermitian; I suppose the reason for this error is caused by a numerical roundness issue obtained while computing the product of these matrices.
I believe this is a similar issue as the one mentioned in issue #28885 where it is said that this "feature" is desired to be kept like this. However, it would be nice to have this inaccuracy caused issue mentioned in the documentation for the cholesky/isposdef/ishermitian calls since newcomers to the Julia language might be confused why their theoretically posdef matrix cannot be factorized using cholesky in Julia unless using other tricks such as using the potrf call from the LAPACK library.
The text was updated successfully, but these errors were encountered: