Skip to content

Conversation

@sebapersson
Copy link
Contributor

I have added information for the new initializationPriorType and objectivePriorType distributions, along with support for truncated distributions in the PEtab v2 specification. Additionally, a mathematical definition is provided for each prior, since some distributions, such as the gamma distribution, can be parameterized in different ways.

I would keep this as a draft until it is decided whether parameterScale should remain part of the PEtab standard. If parameterScale is retained, then I believe we should also keep the parameterScale priors where it makes sense. This is because inference is sometimes performed directly on log(p) (the logarithm of parameter p), as the geometry of the posterior landscape is often more favorable, and to avoid issues with transforming prior distributions, users sometimes place a prior on the log of the parameter directly—even though a prior on the log scale can be nonintuitive (for example, a uniform prior on the log scale is not uniform on the linear scale :).

I will also update the test-suite to test for correct prior evaluation on objectivePriorType for the linear priors (including testing truncated priors).

@sebapersson sebapersson requested a review from a team as a code owner February 17, 2025 09:43
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.

Happy to review again before merging.

I would keep this as a draft until it is decided whether parameterScale should remain part of the PEtab standard

👍

a mathematical definition is provided for each prior

👍

sebapersson and others added 3 commits February 18, 2025 06:31
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
Copy link
Contributor

@matthiaskoenig matthiaskoenig left a comment

Choose a reason for hiding this comment

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

Some minor comments

Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

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

Great, thanks!

I would keep this as a draft until it is decided whether parameterScale should remain part of the PEtab standard.

Agreed.

@sebapersson
Copy link
Contributor Author

Following the reorganization of the parameter table, I have now updated the prior specification.

Regarding truncated priors, this PR proposes that the parameter bounds define the truncation points.

@sebapersson sebapersson requested a review from a team March 28, 2025 14:18
Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me.

Renaming prior to priorDistribution (#618 (comment)) could be included here, but can also be done separately.

Prior parameters used for the :ref:`MAP objective function and for Bayesian inference <v2_objective_function>`.
Prior parameters used for the
:ref:`MAP objective function and for Bayesian inference <v2_objective_function>`.
``priorParameters`` is required if ``prior`` is non-empty.
Copy link
Member

@dweindl dweindl Mar 28, 2025

Choose a reason for hiding this comment

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

For uniform we could allow empty parameters instead of repeating the bounds?

On second thought, why not just leave the prior distribution empty in that case...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point. I lean more towards that we should maintain consistency that if a priorDistribution is specified, then parameters must be specified.

@sebapersson
Copy link
Contributor Author

Renaming prior to priorDistribution (#618 (comment)) could be included here, but can also be done separately.

Good point, I will add it here.

sebapersson and others added 2 commits March 28, 2025 15:13
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
@sebapersson sebapersson requested review from a team and dilpath March 28, 2025 15:28
Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

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

👍

@dweindl dweindl requested review from FFroehlich and fbergmann March 28, 2025 15:46
sebapersson and others added 2 commits March 28, 2025 15:50
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
@sebapersson sebapersson changed the title Draft: Update available priors for v2 Add new parameter prior distributions Mar 28, 2025
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.

Looks good

Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
- *logUniform*: parameters of corresponding uniform distribution (see uniform)
- *normal*: mean; standard deviation (**not** variance)
- *rayleigh*: scale
- *uniform*: lower bound; upper bound
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we really need extra lower/upper bounds? shouldn't that be implied by parameter bounds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good, but also tricky point. You are correct the lower- and upper parameter bounds do imply the bounds. However, I think for consistency that we should for all priors enforce that parameters are specified. I am open for discussing this though.

@sebapersson
Copy link
Contributor Author

Following review suggestions I added the priors in a table instead using the list-table syntax, and I think this makes it easier to digest the docs. If everyone agree, I think we can now merge this PR.

@sebapersson
Copy link
Contributor Author

This can be merged now right?

@dweindl dweindl merged commit 6f5c419 into PEtab-dev:main Apr 23, 2025
2 checks passed
dweindl added a commit to dweindl/libpetab-python that referenced this pull request Apr 24, 2025
Add additional probability distributions as required for PEtab-dev/PEtab#595.
See PEtab-dev#374.
dweindl added a commit to dweindl/libpetab-python that referenced this pull request Apr 25, 2025
Add additional probability distributions as required for PEtab-dev/PEtab#595.
See PEtab-dev#374.
dweindl added a commit to dweindl/libpetab-python that referenced this pull request Apr 25, 2025
Add additional probability distributions as required for PEtab-dev/PEtab#595.
See PEtab-dev#374.
dweindl added a commit to PEtab-dev/libpetab-python that referenced this pull request Apr 25, 2025
Add additional probability distributions as required for PEtab-dev/PEtab#595.
See #374.
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.

5 participants