Skip to content

Add moment matching#699

Merged
aloctavodia merged 7 commits intoarviz-devs:mainfrom
aloctavodia:moment_matching
Oct 28, 2025
Merged

Add moment matching#699
aloctavodia merged 7 commits intoarviz-devs:mainfrom
aloctavodia:moment_matching

Conversation

@aloctavodia
Copy link
Copy Markdown
Contributor

Add function to perform moment matching.

dist0 = pz.Normal(14, 1)
dist = pz.Gamma()
pz.match_moments(dist0, dist, moments="mv")
output
  • Renames internal function optimize_moments to optimize_mean_sigma
  • ToDo: Add test, update docs.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 94.79769% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.76%. Comparing base (447e17e) to head (c1739f6).

Files with missing lines Patch % Lines
preliz/unidimensional/matching.py 90.14% 7 Missing ⚠️
preliz/distributions/binomial.py 66.66% 1 Missing ⚠️
preliz/ppls/pymc_io.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #699      +/-   ##
==========================================
+ Coverage   73.43%   73.76%   +0.33%     
==========================================
  Files         108      110       +2     
  Lines        9112     9254     +142     
==========================================
+ Hits         6691     6826     +135     
- Misses       2421     2428       +7     

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

@aloctavodia aloctavodia merged commit 3e5bbae into arviz-devs:main Oct 28, 2025
4 checks passed
@aloctavodia aloctavodia deleted the moment_matching branch October 28, 2025 08:47
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