Skip to content

Refactor and use Cholesky decomposition for correlated_values and correlated_values_norm#271

Open
jagerber48 wants to merge 7 commits intolmfit:masterfrom
jagerber48:feature/covar_cholesky_decomp
Open

Refactor and use Cholesky decomposition for correlated_values and correlated_values_norm#271
jagerber48 wants to merge 7 commits intolmfit:masterfrom
jagerber48:feature/covar_cholesky_decomp

Conversation

@jagerber48
Copy link
Copy Markdown
Contributor

@jagerber48 jagerber48 commented Nov 16, 2024

Clean up correlated_values and correlated_values_norm. Make the code easier to follow. Also use the more efficient Cholesky decomposition in cases where the user-provided covariance matrix is positive-definite. If it is strictly positive semi-definite then use the eigenvalue decomposition that was previously used.

Note, previously correlated_values_norm (which accepts a normalized correlation matrix) did the numerical lifting and correlated_values (which accepts a covariance matrix) called correlated_values_norm. This is reversed now. Now correlated_values does the numerical work and correlated_values_norm calls correlated_values.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 16, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.56%. Comparing base (969324d) to head (2f7d1b5).
⚠️ Report is 49 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #271      +/-   ##
==========================================
+ Coverage   96.50%   96.56%   +0.05%     
==========================================
  Files          16       16              
  Lines        1919     1951      +32     
==========================================
+ Hits         1852     1884      +32     
  Misses         67       67              
Flag Coverage Δ
macos-latest-3.10 95.02% <100.00%> (+0.08%) ⬆️
macos-latest-3.11 95.02% <100.00%> (+0.08%) ⬆️
macos-latest-3.12 95.02% <100.00%> (+0.08%) ⬆️
macos-latest-3.8 95.00% <100.00%> (+0.07%) ⬆️
macos-latest-3.9 95.00% <100.00%> (+0.07%) ⬆️
no-numpy 73.62% <0.00%> (-1.23%) ⬇️
ubuntu-latest-3.10 95.02% <100.00%> (+0.08%) ⬆️
ubuntu-latest-3.11 95.02% <100.00%> (+0.08%) ⬆️
ubuntu-latest-3.12 95.02% <100.00%> (+0.08%) ⬆️
ubuntu-latest-3.8 95.00% <100.00%> (+0.07%) ⬆️
ubuntu-latest-3.9 95.00% <100.00%> (+0.07%) ⬆️
windows-latest-3.10 95.02% <100.00%> (+0.08%) ⬆️
windows-latest-3.11 95.02% <100.00%> (+0.08%) ⬆️
windows-latest-3.12 95.02% <100.00%> (+0.08%) ⬆️
windows-latest-3.8 95.00% <100.00%> (+0.07%) ⬆️
windows-latest-3.9 95.00% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@jagerber48
Copy link
Copy Markdown
Contributor Author

This PR is ready for review.

@jagerber48
Copy link
Copy Markdown
Contributor Author

While this PR is ready for review, it's going to conflict badly with #262. Let's hold off on this one until after that one.

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.

Use Cholesky decomposition for correlated_values

1 participant