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

Validator: check for positive bounds for log-scaled parameter #278

Merged
merged 7 commits into from
Jun 27, 2024

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Jun 26, 2024

Check the parameter table for positive bounds for log-scaled estimated parameters that don't have an explicit intialization prior.

See discussion in #259

Supersedes and closes #259

Check the parameter table for positive bounds for log-scaled estimated
parameters that don't have an explicit intialization prior.

See discussion in PEtab-dev#259

Supersedes and closes PEtab-dev#259
@dweindl dweindl requested a review from a team as a code owner June 26, 2024 15:16
@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.65%. Comparing base (f567a1e) to head (0fce8b2).

Files Patch % Lines
petab/lint.py 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #278      +/-   ##
===========================================
- Coverage    75.68%   75.65%   -0.03%     
===========================================
  Files           40       40              
  Lines         4137     4141       +4     
  Branches       891      893       +2     
===========================================
+ Hits          3131     3133       +2     
- Misses         744      745       +1     
- Partials       262      263       +1     

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

Copy link
Member

@dilpath dilpath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +560 to +564
if (
row.get(PARAMETER_SCALE, LIN) in [LOG, LOG10]
and (row[LOWER_BOUND] == 0.0 or row[UPPER_BOUND] == 0.0)
and not row.get(INITIALIZATION_PRIOR_TYPE)
):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move row[UPPER_BOUND] == 0.0 above, i.e. change row[UPPER_BOUND] < 0.0 to row[UPPER_BOUND] <= 0.0 -- does not make sense to estimate something that can only take the value 0.0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lb=ub is allowed so far. I'd say things that are legal but dumb shouldn't raise exceptions. Although we might want to add some optional hints for improvement at some point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for me 👍 Should we check the initialization prior then, to make sure it's sampling in finite bounds?

@dweindl dweindl merged commit 68144a0 into PEtab-dev:develop Jun 27, 2024
7 checks passed
@dweindl dweindl deleted the lint_pos_log branch June 27, 2024 08:53
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.

3 participants