Skip to content

Conversation

@danielwe
Copy link
Contributor

@danielwe danielwe commented May 8, 2025

I find it worth pointing out explicitly in the docs that LDLt, which mathematically looks like a drop-in replacement for Cholesky that does away with the positive definiteness requirement, comes with the following caveats:

  • It fails for a lot of matrices (for example, ldlt(Symmetric(sprandn(1000, 1000, p))) basically never succeeds for any relevant sparsity p) due to the requirement that all leading principal minors be well-conditioned
  • In CHOLMOD, ldlt is significantly slower than cholesky as it does not have a supernodal implementation

So I made some docstring edits to clarify the relationship and tradeoffs between cholesky and ldlt.

Citation for these claims: pages 106-107 in the CHOLMOD user guide at https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/v7.10.3/CHOLMOD/Doc/CHOLMOD_UserGuide.pdf

@codecov
Copy link

codecov bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.95%. Comparing base (16bbcbc) to head (f4a1d1a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #621      +/-   ##
==========================================
- Coverage   84.18%   83.95%   -0.24%     
==========================================
  Files          12       12              
  Lines        9265     9265              
==========================================
- Hits         7800     7778      -22     
- Misses       1465     1487      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@dkarrasch dkarrasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems concise and helpful.

@ViralBShah ViralBShah merged commit b225a85 into JuliaSparse:main May 8, 2025
9 of 10 checks passed
@ViralBShah ViralBShah added the backport 1.12 Change should be backported to release-1.12 label May 10, 2025
dkarrasch pushed a commit that referenced this pull request May 11, 2025
I find it worth pointing out explicitly in the docs that LDLt, which
mathematically looks like a drop-in replacement for Cholesky that does
away with the positive definiteness requirement, comes with the
following caveats:

* It fails for a lot of matrices (for example,
`ldlt(Symmetric(sprandn(1000, 1000, p)))` basically never succeeds for
any relevant sparsity `p`) due to the requirement that all leading
principal minors be well-conditioned
* In CHOLMOD, `ldlt` is significantly slower than `cholesky` as it does
not have a supernodal implementation

So I made some docstring edits to clarify the relationship and tradeoffs
between `cholesky` and `ldlt`.

Citation for these claims: pages 106-107 in the CHOLMOD user guide at
https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/v7.10.3/CHOLMOD/Doc/CHOLMOD_UserGuide.pdf
@dkarrasch dkarrasch mentioned this pull request May 11, 2025
6 tasks
@dkarrasch dkarrasch removed the backport 1.12 Change should be backported to release-1.12 label May 11, 2025
@danielwe danielwe deleted the patch-1 branch August 27, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants