Adding Metropolis-Adjusted Langevin Algorithm
This pull request introduces a new gradient-based sampler, the Metropolis-Adjusted Langevin Algorithm (MALA), to the pypesto.sample module, and refactors the covariance regularization in the adaptive Metropolis sampler. The changes also enhance the test suite and documentation to demonstrate and validate the new functionality.
I refactored the covariance regularization to return both the Cholesky decomposition and the regularized covariance matrix, improving numerical stability. The regularization function now supports multiple attempts and safe fallback strategies. Before it could happen that adaptive MCMC just fails at some point due to an ill-conditioned proposal covariance.
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
:x: Patch coverage is 92.13483% with 7 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 84.36%. Comparing base (bc7d89a) to head (7cad7fd).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| pypesto/sample/adaptive_metropolis.py | 87.87% | 4 Missing :warning: |
| pypesto/sample/mala.py | 93.18% | 3 Missing :warning: |
| :exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality. |
Additional details and impacted files
@@ Coverage Diff @@
## develop #1617 +/- ##
===========================================
- Coverage 84.37% 84.36% -0.01%
===========================================
Files 164 165 +1
Lines 14320 14395 +75
===========================================
+ Hits 12082 12145 +63
- Misses 2238 2250 +12
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@dilpath, this is ready to merge I think