Function for replacing objectivePrior* by observables/measurements#309
Merged
dweindl merged 9 commits intoPEtab-dev:developfrom Oct 15, 2024
Merged
Function for replacing objectivePrior* by observables/measurements#309dweindl merged 9 commits intoPEtab-dev:developfrom
objectivePrior* by observables/measurements#309dweindl merged 9 commits intoPEtab-dev:developfrom
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. |
dilpath
approved these changes
Oct 14, 2024
Member
dilpath
left a comment
There was a problem hiding this comment.
Overall, looks great, thanks!
Comment on lines
+98
to
+104
| 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], | ||
| ) |
Member
There was a problem hiding this comment.
Looks useful, could be moved to some calculate_posterior_for_table method like calculate_llh_for_table
Member
Author
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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