On Monday, April 7, 2014 3:24:32 PM UTC-5, Iain Dunning wrote: > > Hi all, > > I have the following matrix (in a copy-pasteable format) > > X = [1.00000000753845 -.9999999962147147 -1.0000000052345246 > -1.0000000048451771; > -.9999999962147147 .9999999849183356 .9999999938533486 > .9999999932021346; > -1.0000000052345246 .9999999938533486 1.0000000081826723 > 1.0000000034216714; > -1.0000000048451771 .9999999932021346 1.0000000034216714 > 1.0000000058875202] > > and I have > println(eig(X)) > > telling me > [8.01744247656805e-17, 2.6859121865768767e-9, 3.823536365571658e-9, > 4.000000000017529] > (i.e. that it is PSD) > > but > println(chol(X)) > > giving me > ERROR: PosDefException(4) > > Two questions: > 1) How do I make chol try harder? Do I want to use cholfact and increase > tol to... what? > 2) How can I find out what (4) means? Because when I do the following: > > As a last resort you can always read the documentation :-)
The 4 is the error number from the LAPACK.potrf! function, indicating that the Cholesky factorization failed on the fourth column julia> chol(rand(4,4)) > ERROR: PosDefException(2) > in cholfact! at linalg/factorization.jl:36 > in chol at linalg/factorization.jl:44 > > Umm - rand(4,4) is not expected to be symmetric. > it is (2) - so I'm guessing that the 4 communicates something useful. > > Cheers, > Iain > > >
