-
Notifications
You must be signed in to change notification settings - Fork 13
Clarify interpretation of noise distributions #656
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
base: main
Are you sure you want to change the base?
Conversation
dilpath
left a comment
There was a problem hiding this 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)`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | (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)`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | (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)`) |
| 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. |
There was a problem hiding this comment.
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
| 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)`) |
There was a problem hiding this comment.
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)`) |
There was a problem hiding this comment.
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
e.g.:
| | (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)`) |
When implementing support for
LogLaplacein 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 $\log(m) \sim \mathcal{N}(\log(y), \sigma)$ , which implies $m \sim \mathcal{LN}(\log(y), \sigma)$ . For this
LogNormaldistribution in PEtab we haveLogNormal, the median isy(expof first argument). A similar interpretation holds forLogLaplace. Overall, this PR aims to clarify this.