From 54132c070bb14e1a6ae25276a79d32bcbb59c8e9 Mon Sep 17 00:00:00 2001 From: sebapersson Date: Wed, 17 Dec 2025 09:19:10 +0000 Subject: [PATCH 1/4] Clarify interpretation of noise distributions --- doc/v2/documentation_data_format.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 0365154d..85378d7b 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -748,7 +748,7 @@ Noise distributions 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), and :math:`\sigma` the scale parameter of the noise distribution as given via the ``noiseFormula`` field (the standard deviation of a normal, or the scale parameter of a Laplace model). @@ -761,25 +761,31 @@ Then we have the following effective noise distributions: * - Type - ``noiseDistribution`` - Probability density function (PDF) - * - Gaussian distribution + * - | Gaussian distribution + | (i.e., :math:`m` is normally distributed as :math:`m \sim \mathcal{N}(y, \sigma)`) - ``normal`` - .. math:: \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)`) - ``log-normal`` - .. math:: \pi(m|y,\sigma) = \frac{1}{\sqrt{2\pi}\sigma m}\exp\left(-\frac{(\log m - \log y)^2}{2\sigma^2}\right) * - Laplace distribution - - ``laplace`` + - | ``laplace`` + | (i.e., :math:`m` is Laplace distributed as :math:`m \sim \mathcal{L}(y, \sigma)`) - .. math:: \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)`) - ``log-laplace`` - .. math:: \pi(m|y,\sigma) = \frac{1}{2\sigma m}\exp\left(-\frac{|\log m - \log y|}{\sigma}\right) +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. + The distributions above are for a single data point. For a collection :math:`D=\{m_i\}_i` of data points and corresponding simulations :math:`Y=\{y_i\}_i` From f919f9c80ecf8a903a48ca3e207de18ced232247 Mon Sep 17 00:00:00 2001 From: Sebastian Persson <46872750+sebapersson@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:29:55 +0000 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- doc/v2/documentation_data_format.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 85378d7b..b25dd814 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -762,12 +762,12 @@ Then we have the following effective noise distributions: - ``noiseDistribution`` - Probability density function (PDF) * - | Gaussian distribution - | (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)`) - ``normal`` - .. math:: \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 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)`) - ``log-normal`` - .. math:: \pi(m|y,\sigma) = \frac{1}{\sqrt{2\pi}\sigma m}\exp\left(-\frac{(\log m - \log y)^2}{2\sigma^2}\right) @@ -777,12 +777,12 @@ Then we have the following effective noise distributions: - .. math:: \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 as :math:`\log(m) \sim \mathcal{L}(\log(y), \sigma)`) + | (i.e., :math:`\log(m) \sim \mathrm{Laplace}(\log(y), \sigma)`) - ``log-laplace`` - .. math:: \pi(m|y,\sigma) = \frac{1}{2\sigma m}\exp\left(-\frac{|\log m - \log y|}{\sigma}\right) -Note that, for all continuous distributions, the simulated value is modeled +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. From fd7c77c7c4b357a00e14ec3ec23cae91ccddcfe0 Mon Sep 17 00:00:00 2001 From: sebapersson Date: Sun, 18 Jan 2026 09:49:26 +0000 Subject: [PATCH 3/4] Clairfy noise parameter, and format table --- doc/v2/documentation_data_format.rst | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index b25dd814..fcaee52f 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -746,13 +746,12 @@ Detailed field description Noise distributions ~~~~~~~~~~~~~~~~~~~ -Denote by :math:`m` the measured value, -:math:`y:=\text{observableFormula}` the simulated value -(the median of the noise distribution), -and :math:`\sigma` the scale parameter of the noise distribution -as given via the ``noiseFormula`` field (the standard deviation of a normal, -or the scale parameter of a Laplace model). -Then we have the following effective noise distributions: +Let :math:`m` denote the measured value, +:math:`y := \text{observableFormula}` the simulated value (the median of +the noise distribution), and :math:`\sigma := \text{noiseFormula}` the +noise parameter (the standard deviation and the scale parameter for the +Normal and Laplace distributions, respectively). Then we have the following +effective noise distributions: .. list-table:: :header-rows: 1 @@ -771,9 +770,9 @@ Then we have the following effective noise distributions: - ``log-normal`` - .. math:: \pi(m|y,\sigma) = \frac{1}{\sqrt{2\pi}\sigma m}\exp\left(-\frac{(\log m - \log y)^2}{2\sigma^2}\right) - * - Laplace distribution - - | ``laplace`` + * - | Laplace distribution | (i.e., :math:`m` is Laplace distributed as :math:`m \sim \mathcal{L}(y, \sigma)`) + - ``laplace`` - .. math:: \pi(m|y,\sigma) = \frac{1}{2\sigma}\exp\left(-\frac{|m-y|}{\sigma}\right) * - | Log-Laplace distribution From f61c2232b188abda550aa2ab942a7072ea9fe55c Mon Sep 17 00:00:00 2001 From: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> Date: Sun, 18 Jan 2026 15:43:36 +0100 Subject: [PATCH 4/4] Apply suggestions from code review --- doc/v2/documentation_data_format.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index fcaee52f..dbdd44d9 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -761,17 +761,17 @@ effective noise distributions: - ``noiseDistribution`` - Probability density function (PDF) * - | Gaussian distribution - | (i.e., :math:`m` is normally distributed as :math:`m \sim \mathcal{N}(y, \sigma^2)`) + | (i.e., :math:`m \sim \mathcal{N}(y, \sigma^2)`) - ``normal`` - .. math:: \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 as :math:`\log(m) \sim \mathcal{N}(\log(y), \sigma^2)`) + | (i.e., :math:`\log(m) \sim \mathcal{N}(\log(y), \sigma^2)`) - ``log-normal`` - .. math:: \pi(m|y,\sigma) = \frac{1}{\sqrt{2\pi}\sigma m}\exp\left(-\frac{(\log m - \log y)^2}{2\sigma^2}\right) * - | Laplace distribution - | (i.e., :math:`m` is Laplace distributed as :math:`m \sim \mathcal{L}(y, \sigma)`) + | (i.e., :math:`m \sim \mathrm{Laplace}(y, \sigma)`) - ``laplace`` - .. math:: \pi(m|y,\sigma) = \frac{1}{2\sigma}\exp\left(-\frac{|m-y|}{\sigma}\right)