Skip to content

Conversation

dom-linkevicius
Copy link

@dom-linkevicius dom-linkevicius commented Oct 2, 2025

As per title, I needed a multivariate Laplace distribution in some applications, Distributions.jl didn't seem to have it, so here is one of its versions (of the few possible). This PR follows the mathematical description provided here. A lot of the code is based on MvNormal implementation because externally they have lots of similarities.

Stuff done/to do (trying to follow the requirements outlined in the docs:

  • length
  • sampler - it wasn't immediately obvious to me that a more efficient sampler for batches exists, so I didn't implement one. If I am missing something, please let me know and I'll try to implement it.
  • eltype
  • Distributions._rand!
  • Distributions._logpdf
  • mean
  • var
  • cov
  • invcov

Feedback welcome!

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.44%. Comparing base (bbdd4f1) to head (b3a6400).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2004      +/-   ##
==========================================
+ Coverage   86.35%   86.44%   +0.08%     
==========================================
  Files         146      147       +1     
  Lines        8782     8835      +53     
==========================================
+ Hits         7584     7637      +53     
  Misses       1198     1198              

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

@dom-linkevicius dom-linkevicius marked this pull request as ready for review October 4, 2025 23:48
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.

2 participants