-
Notifications
You must be signed in to change notification settings - Fork 6
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
Function for replacing objectivePrior*
by observables/measurements
#309
Conversation
Reformulate the given PEtab problem such that the objective priors are converted to measurements. This is done by adding a new observable for each prior and adding a corresponding measurement to the measurement table. The resulting optimization problem will be equivalent to the original problem. This is meant to be used for tools that do not support priors. Closes PEtab-dev#307
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #309 +/- ##
===========================================
+ Coverage 72.86% 74.95% +2.09%
===========================================
Files 51 52 +1
Lines 4842 4896 +54
Branches 826 838 +12
===========================================
+ Hits 3528 3670 +142
+ Misses 1018 921 -97
- Partials 296 305 +9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks great, thanks!
prior_contrib += norm.logpdf( | ||
petab_problem_priors.x_nominal_free_scaled[ | ||
petab_problem_priors.x_free_ids.index(parameter_id) | ||
], | ||
loc=prior_pars[0], | ||
scale=prior_pars[1], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks useful, could be moved to some calculate_posterior_for_table
method like calculate_llh_for_table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Dilan Pathirana <[email protected]>
Reformulate the given PEtab problem such that the objective priors are converted to measurements. This is done by adding a new observable for each prior and adding a corresponding measurement to the measurement table. The resulting optimization problem will be equivalent to the original problem. This is meant to be used for tools that do not support priors.
Closes #307