-
Notifications
You must be signed in to change notification settings - Fork 7
Add v2.Problem.has_{map,ml}_objective
#463
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #463 +/- ##
==========================================
+ Coverage 75.18% 75.21% +0.02%
==========================================
Files 62 62
Lines 6856 6862 +6
Branches 1224 1224
==========================================
+ Hits 5155 5161 +6
Misses 1234 1234
Partials 467 467 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
To check for the type of objective function encoded in the PEtab problem.
dilpath
left a comment
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.
👍
| Note that this will default to uniform distributions over the | ||
| parameter bounds for parameters without an explicit prior. |
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.
Add this to avoid invalid behavior? if self.has_ml_objective: return None
| return all( | ||
| p.prior_distribution is None for p in self.parameters if p.estimate | ||
| ) |
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.
Since it's binary
| return all( | |
| p.prior_distribution is None for p in self.parameters if p.estimate | |
| ) | |
| return not self.has_map_objective |
| :returns: The prior distributions for the estimated parameters. | ||
| """ | ||
| return {p.id: p.prior_dist for p in self.parameters if p.estimate} |
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.
Unrelated but Parameter.prior_dist seems confusing since it can differ from Parameter.prior_distribution. It seems like this default to the uniform distribution should be handled by Problem-level methods, rather than within the Parameter?
To check for the type of objective function encoded in the PEtab problem.