-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error by default for pivoted Cholesky of semidefinte matrix #720
Comments
I don’t remember if we did this on purpose but a challenge here is that the info code can be different from zero both when it’s PSD and when it’s indefinite. I think the I’d think that our docs for |
Hmm, yes, it is a bit confusing that LAPACK gives a non-zero info code for PSD matrices. It seems to have caused some confusion in other places as well. Does something like
seem reasonable? And using this method to decide if to throw an error if |
Might work but it's been a while since I looked into the detils. The LAPACK documentation says
Would you be able to take a look at section 7? There is also the consideration of slightly negative diagonal values. We recently introduced a tolerance when computing the matrix square root to avoid that |
(here is the working note number 161) I didn't quite understand if there is an easy way to check that the matrix is PSD. My impression is that there isn't? "Of course, if there is serious doubt over semi-definiteness then a symmetric indefinite factorization should be used." In that case I guess the best solution would that the user has to put |
I tried to get the pivoted Cholesky factorization of a positive semidefinite matrix using
However this throws
RankDeficientException(1)
, even though it seems like the matrix was factorized alright?!It took some time for me to figure out that the following works.
To me it seems non-intuitive having to turn off the check for something that should work.
According to the docs one should also be able check
issuccess(C)
, however this throwsERROR: MethodError: no method matching issuccess(::CholeskyPivoted{Float64,Array{Float64,2}})
Here are the docs:
Another inconsistency is that the docs for
LAPACK.pstrf!
says that it works for positive-definite matrices while the LAPACK docs says that it works for positive semidefinite matrices. If it's not a typo, a remark in the docs could be in order.The text was updated successfully, but these errors were encountered: