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

NegLogParameterPriors does not evaluate prior density at fixed params #1413

Merged
merged 10 commits into from
Jun 13, 2024

Conversation

arrjon
Copy link
Contributor

@arrjon arrjon commented Jun 10, 2024

Based on #1412

Making the NegLogParameterPriors aware of fixed parameters. The density is not evaluted for those. Moreover, the petab importet is updated to indicate the fixed parameters while creating the prior.

Question: should this argument stay optional? If priors are not given for fixed parameters, no problem would occure. The problem only occurs when priors are given and parameters fixed.

@arrjon arrjon self-assigned this Jun 10, 2024
@arrjon arrjon requested a review from dilpath June 10, 2024 17:27
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2024

Codecov Report

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

Project coverage is 83.90%. Comparing base (2250dbc) to head (b178863).

Files Patch % Lines
.../objective/roadrunner/petab_importer_roadrunner.py 50.00% 2 Missing ⚠️
pypesto/petab/importer.py 50.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1413      +/-   ##
===========================================
- Coverage    83.92%   83.90%   -0.03%     
===========================================
  Files          160      160              
  Lines        13061    13067       +6     
===========================================
+ Hits         10962    10964       +2     
- Misses        2099     2103       +4     

☔ 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.

Thanks, I think it looks fine, but since we have prior_list, we can overwrite immediately, instead of recomputing it every time it's accessed.

pypesto/objective/priors.py Outdated Show resolved Hide resolved
pypesto/objective/priors.py Outdated Show resolved Hide resolved
pypesto/objective/priors.py Outdated Show resolved Hide resolved
arrjon and others added 4 commits June 11, 2024 11:38
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
@arrjon arrjon added the bug Something isn't working label Jun 11, 2024
@arrjon arrjon marked this pull request as ready for review June 11, 2024 09:42
@dilpath
Copy link
Member

dilpath commented Jun 11, 2024

Thanks! Sorry for the mask suggestion, I wasn't familiar with the code

Copy link
Collaborator

@PaulJonasJost PaulJonasJost left a comment

Choose a reason for hiding this comment

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

Nice, a test for this would be good. Also not entirely sure whether it is relevant, but the problem has a function fix_parameters, for this it should be accounted as well? 🤔

@arrjon
Copy link
Contributor Author

arrjon commented Jun 13, 2024

Also not entirely sure whether it is relevant, but the problem has a function fix_parameters, for this it should be accounted as well? 🤔

That is relevant, but the function calls normalize, which in turn calls update_from_problem, so no need to add in fix_parameters.

@arrjon
Copy link
Contributor Author

arrjon commented Jun 13, 2024

After discussing this issue in #1412, we will not make the prior aware of fixed parameters. Instead, users should specifiy priors correctly in the PEtab problem. In this way, we will allow maximum flexibility.

@arrjon arrjon merged commit f183b3c into develop Jun 13, 2024
18 checks passed
@arrjon arrjon deleted the fix_prior_fix_parameters branch June 13, 2024 12:33
This was referenced Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants