Skip to content

Conversation

@sebapersson
Copy link
Contributor

When implementing support for LogLaplace in PEtab.jl, I realized that the interpretation of the noise distributions in the spec is not entirely clear. In particular, for the supported distributions, the model output is not assumed to be the mean or location of the data distribution, but rather its median.

For example, let ($m$) be the measured value, $y := \text{observableFormula}$ the simulated value, and $\sigma$ the noise. For the LogNormal distribution in PEtab we have $\log(m) \sim \mathcal{N}(\log(y), \sigma)$, which implies $m \sim \mathcal{LN}(\log(y), \sigma)$. For this LogNormal, the median is y (exp of first argument). A similar interpretation holds for LogLaplace. Overall, this PR aims to clarify this.

@sebapersson sebapersson requested a review from a team as a code owner December 17, 2025 09:28
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!

Denote by :math:`m` the measured value,
:math:`y:=\text{observableFormula}` the simulated value
(the location parameter of the noise distribution),
(the median of the noise distribution),
Copy link
Member

Choose a reason for hiding this comment

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

Thanks, you are right, that wasn't worded correctly.

Fine to merge with Dilan's suggestions, but with respect to #654, I am wondering if we really want to refer here to the median, or just generally to something like "first parameter in canonical notation", or just nothing at all.

Copy link
Contributor Author

@sebapersson sebapersson Jan 18, 2026

Choose a reason for hiding this comment

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

"first parameter in canonical notation"

This is not correct either, as with log-normal we have log(m) not m entering the formula, so I would like to keep median (I think it helps to think about what the noise distribution means). As for #654, I think the way to handle it would simply be to split the noise distribution into two sections, discrete and continuous.

:math:`y:=\text{observableFormula}` the simulated value
(the location parameter of the noise distribution),
(the median of the noise distribution),
and :math:`\sigma` the scale parameter of the noise distribution
Copy link
Member

Choose a reason for hiding this comment

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

Same problem here, right? For the log-normal distribution, sigma wouldn't be the scale but its logarithm?

Copy link
Contributor Author

@sebapersson sebapersson Jan 18, 2026

Choose a reason for hiding this comment

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

Actually, for normal distributions it is the standard distribution (no log), while for Laplace it is the scale. I have made this clearer.

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, now just for consistency and to make the table narrower, I'll shorten the other descriptions too.

Removes the horizontal scrollbar on the table for me: https://petab--656.org.readthedocs.build/en/656/v2/documentation_data_format.html#noise-distributions

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.

4 participants