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
Cholesky decomposition for sparse matrices #13674
Comments
comment:5
I have a solution implemented at https://github.com/bollu/sage/tree/u/gh-bollu/jan-24-cholesky-for-sparse-numerical-matrices. |
Author: Siddharth Bhat |
Commit: |
New commits:
|
comment:8
Things I don't understand very well:
|
Reviewer: Dima Pasechnik |
comment:10
Ohhkay. So, the title of this ticket is a bit misleading. It's not a cholesky for sparse matrices that's missing, but rather a cholesky decomposition for matrices over inexact rings. For example,
The use of But regardless, the real problem to be solved here is that we need a numerically-stable cholesky factorization that works for most inexact rings. That implementation can then be used (in the meantime) for both the dense and sparse methods, until someone decides to come along and speed it up in the sparse case. I've essentially already done this on #10332, which adds a numerically-stable So my suggestion for this ticket is to use
I think (3) is pretty self-explanatory after reading the docs for
You might be able to save a few microseconds by using the internal |
comment:11
Thanks a lot for the link! My only concern is with that of sparseness; the reason I choose to jump hoops with I'll be glad to benchmark the code, and see which method is faster; I think the route you propose is performant for dense inexact matrices for sure. I'm unsure about the sparse case. Could you please shed some light on the performance characteristics of the linked implementation? |
comment:12
If you need the performance for sparse matrices over |
comment:15
Replying to @dimpase:
For things like cholesky over |
comment:16
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
comment:17
Ticket #31619 allows |
comment:18
Setting a new milestone for this ticket based on a cursory review. |
comment:19
cvxopt is now a pseudo-optional package, but we should still be able to use the approach in comment:14. We can |
Changed author from Siddharth Bhat to Siddharth Bhat, Michael Orlitzky |
comment:20
This should work for both |
Changed branch from u/gh-bollu/jan-24-cholesky-for-sparse-numerical-matrices to u/mjo/ticket/13674 |
comment:21
lgtm |
Changed branch from u/mjo/ticket/13674 to |
comment:23
I am seeing failures such as the one below on aarch64:
|
Changed commit from |
comment:24
@collares - please open a new ticket for this. |
comment:25
Opened #33023 for the test failure, thanks for letting me know about the correct procedure. I didn't know the "Commit" field would be cleared when I posted my first comment, sorry about that. |
comment:26
Replying to @collares:
Thanks, the commit field thing is no big deal, that always happens. I'll see if I can reproduce the problem. The matrix is Hermitian by construction (unless I've made some typo I can't see) so it should be interesting. |
The Cholesky decomposition are implemented in the file sage/matrix/matrix2.pyx for some subfield of the algebraic numbers.
In this implementation the base ring must be exact or, for numerical work, a
matrix with a base ring of
RDF
orCDF
must be used.For the numerical work it's used the Cholesky decomposition implemented in sage/matrix/matrix_double_dense.pyx and because of this a error raised when try to compute the numerical Cholesky decomposition of a sparse matrix.
For this solve this ticket the numerical sparce Cholesky decompostion need to be implemented.
For more information about this topic see https://groups.google.com/forum/?fromgroups=#!topic/sage-support/do55Fayur6U.
CC: @orlitzky @collares
Component: linear algebra
Keywords: matrix, decomposition, cholesky, sparse
Author: Siddharth Bhat, Michael Orlitzky
Branch:
954b9ba
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/13674
The text was updated successfully, but these errors were encountered: