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

Project coverage is 74.95%. Comparing base (d3e4006) to head (d511639).

Files with missing lines Patch % Lines
petab/v1/distributions.py 88.46% 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.86%   74.95%   +0.08%     
===========================================
  Files           52       53       +1     
  Lines         4921     5034     +113     
  Branches       847      849       +2     
===========================================
+ Hits          3684     3773      +89     
- Misses         928      948      +20     
- Partials       309      313       +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 3 times, most recently from 7f1fb62 to 721ba31 Compare December 6, 2024 19:49
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