Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor priors #329

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Dec 4, 2024

Introduces Distribution classes for handling prior distributions, sampling from them, and evaluating negative log-priors (#312). Later on, this can be extended to noise models for measurements and computing loglikelihoods.
This also adds a notebook demonstrating the various prior options which are a common source confusion, and fixes a faulty test.

Closes #311.

👀 notebook: https://petab--329.org.readthedocs.build/projects/libpetab-python/en/329/example/distributions.html

@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 79.57746% with 29 lines in your changes missing coverage. Please review.

Project coverage is 74.90%. Comparing base (9a4efb4) to head (b28e5c1).

Files with missing lines Patch % Lines
petab/v1/distributions.py 84.61% 15 Missing and 5 partials ⚠️
petab/v1/sampling.py 25.00% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #329      +/-   ##
===========================================
- Coverage    74.92%   74.90%   -0.02%     
===========================================
  Files           52       53       +1     
  Lines         4913     5025     +112     
  Branches       845      847       +2     
===========================================
+ Hits          3681     3764      +83     
- Misses         923      947      +24     
- Partials       309      314       +5     

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

@dweindl dweindl force-pushed the 311_refactor_priors branch 4 times, most recently from 0a39f79 to 5313345 Compare December 4, 2024 22:32
Introduce `Distribution` classes for handling prior distributions and sampling from them.
Later on this can be extended to noise models for measurements.
@dweindl dweindl marked this pull request as ready for review December 4, 2024 22:47
@dweindl dweindl requested review from m-philipps and a team as code owners December 4, 2024 22:48
@dweindl dweindl self-assigned this Dec 4, 2024
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