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!

- Probability density function (PDF)
* - Gaussian distribution
* - | Gaussian distribution
| (i.e., :math:`m` is normally distributed as :math:`m \sim \mathcal{N}(y, \sigma)`)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| (i.e., :math:`m` is normally distributed as :math:`m \sim \mathcal{N}(y, \sigma)`)
| (i.e., :math:`m` is normally distributed as :math:`m \sim \mathcal{N}(y, \sigma^2)`)

\pi(m|y,\sigma) = \frac{1}{\sqrt{2\pi}\sigma}\exp\left(-\frac{(m-y)^2}{2\sigma^2}\right)
* - | Log-normal distribution
| (i.e., :math:`\log(m)` is normally distributed)
| (i.e., :math:`\log(m)` is normally distributed as :math:`\log(m) \sim \mathcal{N}(\log(y), \sigma)`)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| (i.e., :math:`\log(m)` is normally distributed as :math:`\log(m) \sim \mathcal{N}(\log(y), \sigma)`)
| (i.e., :math:`\log(m)` is normally distributed as :math:`\log(m) \sim \mathcal{N}(\log(y), \sigma^2)`)

Comment on lines +785 to +787
Note that, for all continuous distributions, the simulated value is modeled
as the median of the noise distribution; i.e., measurements are assumed to
be equally likely to lie above or below the model output.
Copy link
Member

Choose a reason for hiding this comment

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

Possibly not true for the prior distributions; I didn't check. It's implied here that this note doesn't apply to prior distributions, but here's a suggestion just to clarify that

Suggested change
Note that, for all continuous distributions, the simulated value is modeled
as the median of the noise distribution; i.e., measurements are assumed to
be equally likely to lie above or below the model output.
Note that, for all PEtab noise distributions, the simulated value is modeled
as the median of the noise distribution; i.e., measurements are assumed to
be equally likely to lie above or below the model output.

* - Laplace distribution
- ``laplace``
- | ``laplace``
| (i.e., :math:`m` is Laplace distributed as :math:`m \sim \mathcal{L}(y, \sigma)`)
Copy link
Member

Choose a reason for hiding this comment

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

Move to first column. GitHub doesn't let me make the suggestion but you can see the issue here: https://petab--656.org.readthedocs.build/en/656/v2/documentation_data_format.html#noise-distributions

\pi(m|y,\sigma) = \frac{1}{2\sigma}\exp\left(-\frac{|m-y|}{\sigma}\right)
* - | Log-Laplace distribution
| (i.e., :math:`\log(m)` is Laplace distributed)
| (i.e., :math:`\log(m)` is Laplace distributed as :math:`\log(m) \sim \mathcal{L}(\log(y), \sigma)`)
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 be fine with shortening all of these to make the column narrower, and to explicitly write Laplace since I guess it doesn't have a commonly used symbol unlike normal $\mathcal{N}$?

e.g.:

Suggested change
| (i.e., :math:`\log(m)` is Laplace distributed as :math:`\log(m) \sim \mathcal{L}(\log(y), \sigma)`)
| (i.e., :math:`\log(m) \sim \mathrm{Laplace}(\log(y), \sigma)`)

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.

2 participants