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

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

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 82.60870% with 24 lines in your changes missing coverage. Please review.

Project coverage is 74.44%. Comparing base (4a551a7) to head (a272255).

Files with missing lines Patch % Lines
petab/v1/distributions.py 87.90% 11 Missing and 4 partials ⚠️
petab/v1/sampling.py 25.00% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #329      +/-   ##
===========================================
+ Coverage    74.38%   74.44%   +0.06%     
===========================================
  Files           53       54       +1     
  Lines         5196     5303     +107     
  Branches       910      912       +2     
===========================================
+ Hits          3865     3948      +83     
- Misses         984     1004      +20     
- Partials       347      351       +4     

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

@dweindl dweindl force-pushed the 311_refactor_priors branch 5 times, most recently from 5313345 to b28e5c1 Compare December 4, 2024 22:38
@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
@dweindl dweindl force-pushed the 311_refactor_priors branch 4 times, most recently from 721ba31 to d511639 Compare December 7, 2024 10:04
@dweindl dweindl marked this pull request as draft December 8, 2024 11:25
@dweindl
Copy link
Member Author

dweindl commented Dec 9, 2024

Requires some clarification related to normalization of the prior density. Related to PEtab-dev/PEtab#402.

@dweindl dweindl force-pushed the 311_refactor_priors branch 2 times, most recently from c1f1339 to 670f6c9 Compare December 9, 2024 15:03
Introduce `Distribution` classes for handling prior distributions and sampling from them.
Later on this can be extended to noise models for measurements.
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