From e9715350158a31d97e99b23ab4bc8da59c8bb42c Mon Sep 17 00:00:00 2001 From: sebapersson Date: Mon, 17 Feb 2025 10:30:50 +0100 Subject: [PATCH 01/16] Update available priors --- doc/v2/documentation_data_format.rst | 128 ++++++++++++++++++++++----- 1 file changed, 106 insertions(+), 22 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 3ed4df4d..c9ea9ee2 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -107,6 +107,8 @@ PEtab 2.0.0 is a major update of the PEtab format. The main changes are: (math expressions, overriding values in the condition table, etc.) * Support for extensions * Observable IDs are now allowed to be used in observable/noise formulas +* Support for new initializationPriorType and objectivePriorType distributions, + as well as support for truncated distributions. Model definition ---------------- @@ -575,21 +577,28 @@ Detailed field description - ``initializationPriorType`` [STRING, OPTIONAL] - Prior types used for sampling of initial points for estimation. Sampled - points are clipped to lie inside the parameter boundaries specified by - ``lowerBound`` and ``upperBound``. Defaults to ``parameterScaleUniform``. + Prior types used for sampling initial points for estimation. If the prior is + not truncated (see ``initializationPriorParameters``), sampled points are + clipped to lie within the parameter boundaries specified by ``lowerBound`` + and ``upperBound``. Otherwise, points are sampled directly from the truncated + distribution. The default is ``parameterScaleUniform``. - Possible prior types are: + Possible prior types are (for mathematical definition see below): - - *uniform*: flat prior on linear parameters - - *normal*: Gaussian prior on linear parameters + - *cauchy*, Cauchy prior on linear parameters + - *chisquare*, Chisquare prior on linear parameters + - *exponential*, Exponential prior on linear parameters + - *gamma*, Gamma prior on linear parameters - *laplace*: Laplace prior on linear parameters - *logNormal*: exponentiated Gaussian prior on linear parameters - - *logLaplace*: exponentiated Laplace prior on linear parameters + - *normal*: Gaussian prior on linear parameters + - *rayleigh*, Rayleigh prior on linear parameters + - *uniform*: Flat prior on linear parameters + - *parameterScaleCauchy*, Cauchy prior on original parameter scale + - *parameterScaleLaplace*: Laplace prior on original parameter scale + - *parameterScaleNormal*: Gaussian prior on original parameter scale - *parameterScaleUniform* (default): Flat prior on original parameter scale (equivalent to "no prior") - - *parameterScaleNormal*: Gaussian prior on original parameter scale - - *parameterScaleLaplace*: Laplace prior on original parameter scale - ``initializationPriorParameters`` [STRING, OPTIONAL] @@ -597,19 +606,32 @@ Detailed field description separated by a semicolon. Defaults to ``lowerBound;upperBound``. The parameters are expected to be in linear scale except for the ``parameterScale`` priors, where the prior parameters are expected to be - in parameter scale. - - So far, only numeric values will be supported, no parameter names. - Parameters for the different prior types are: - - - uniform: lower bound; upper bound - - normal: mean; standard deviation (**not** variance) - - laplace: location; scale - - logNormal: parameters of corresp. normal distribution (see: normal) - - logLaplace: parameters of corresp. Laplace distribution (see: laplace) - - parameterScaleUniform: lower bound; upper bound - - parameterScaleNormal: mean; standard deviation (**not** variance) - - parameterScaleLaplace: location; scale + in parameter scale (e.g. `log10` scale if a parameter has ``parameterScale`` + `log10`). + + Optionally, a *truncated* distribution can be specified for any distribution + except the uniform distributions by providing a lower and upper bound after + the prior parameters. For example, a truncated normal distribution would be + defined with parameters ``mean;std;lb;ub``, where ``lb`` and ``ub`` are the + lower and upper bounds, respectively. For a truncated distribution, both the + lower and upper bounds must be provided. + + So far, only numeric values are supported, no parameter names. Parameters for + the different prior types are: + + - *cauchy*, location; scale + - *chisquare*, degrees of freedom + - *exponential*, rate + - *gamma*, shape; scale + - *laplace*: location; scale + - *logNormal*: parameters of corresp. normal distribution (see: normal) + - *normal*: mean; standard deviation (**not** variance) + - *rayleigh*, scale + - *uniform*: lower bound; upper bound + - *parameterScaleCauchy*, location; scale + - *parameterScaleLaplace*: location; scale + - *parameterScaleNormal*: mean; standard deviation (**not** variance) + - *parameterScaleUniform*: lower bound; upper bound - ``objectivePriorType`` [STRING, OPTIONAL] @@ -620,7 +642,69 @@ Detailed field description Prior parameters used for the objective function during estimation. For more detailed documentation, see ``initializationPriorParameters``. + As for initialization priors, truncated priors are allowed. + +Prior distributions +~~~~~~~~~~~~~~~~~~~ +For ``initializationPriorParameters`` and ``objectivePriorType`` several +distributions are supported (see above). Denote the parameter value by :math:`x` +and the Gamma function by :math:`\Gamma`; then, the following parameterizations +are used for the supported priors: + +- *cauchy*: + - parameters: (location, scale) = :math:`(\mu, \sigma)` + + .. math:: + \pi(x|\mu, \sigma) = \frac{1}{\pi \sigma \left( 1 + \left(\frac{x - \mu}{\sigma} \right)^2\right)} \quad x \in (-\infty, \infty) + +- *chisquare*, : + - parameter: degree of freedom = :math:`\nu` + + .. math:: + \pi(x|\nu) = \frac{x^{\nu/2-1}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)}, \quad x \in (0, \infty) + +- *exponential*: + - parameter: scale = :math:`\theta` + + .. math:: + \pi(x|\theta) = \frac{1}{\theta}e^{-x/\theta} \quad x \in (0, \infty) + +- *gamma*: + - parameters: (shape, scale) = :math:`(\alpha, \theta)` + + .. math:: + \pi(x|\alpha, \theta) = \frac{x^{\alpha - 1}e^{-x/\theta}}{\Gamma(\alpha)\theta^{\alpha}}, \quad x \in (0, \infty) + +- *laplace*: + - parameters: (location, scale) = :math:`(\mu, \sigma)` + + .. math:: + \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right), \quad x \in (-\infty, \infty) + +- *logNormal*: + - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` + + .. math:: + \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma} \exp\left(- \frac{\left(\log(x) - \mu\right)^2}{2\sigma^2}\right) \quad x \in (0, \infty) + +- *normal*: + - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` + + .. math:: + \pi(x|\mu,\sigma) = \frac{1}{\sqrt{2\pi}\sigma}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \quad x \in (-\infty, \infty) + +- *rayleigh*: + - parameter: scale = :math:`\sigma` + + .. math:: + \pi(x|\sigma) = \frac{x}{\sigma^2}\exp\left(\frac{-x^2}{2\sigma^2}\right) \quad x \in (0, \infty) + +- *uniform*: + - parameters: (lower bound, upper bound) = :math:`(a, b)` + + .. math:: + \pi(x|a, b) = \frac{1}{b - a} \quad x \in [a, b] Visualization table ------------------- From 73fc93f3021665738e88dd7d34f982f72c074aca Mon Sep 17 00:00:00 2001 From: sebapersson <46872750+sebapersson@users.noreply.github.com> Date: Tue, 18 Feb 2025 06:31:52 +0100 Subject: [PATCH 02/16] Update doc/v2/documentation_data_format.rst Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- doc/v2/documentation_data_format.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index c9ea9ee2..7045aa6b 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -647,7 +647,7 @@ Detailed field description Prior distributions ~~~~~~~~~~~~~~~~~~~ -For ``initializationPriorParameters`` and ``objectivePriorType`` several +For ``initializationPriorType`` and ``objectivePriorType`` several distributions are supported (see above). Denote the parameter value by :math:`x` and the Gamma function by :math:`\Gamma`; then, the following parameterizations are used for the supported priors: From af0ae24e0db1c5684650438b2ae6b968e4b47cec Mon Sep 17 00:00:00 2001 From: sebapersson <46872750+sebapersson@users.noreply.github.com> Date: Tue, 18 Feb 2025 06:33:59 +0100 Subject: [PATCH 03/16] Update doc/v2/documentation_data_format.rst Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- doc/v2/documentation_data_format.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 7045aa6b..0d7bd750 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -653,6 +653,7 @@ and the Gamma function by :math:`\Gamma`; then, the following parameterizations are used for the supported priors: - *cauchy*: + - parameters: (location, scale) = :math:`(\mu, \sigma)` .. math:: From f35e76177a44633d379fee67c25e7b5e0ed95570 Mon Sep 17 00:00:00 2001 From: sebapersson Date: Tue, 18 Feb 2025 06:37:33 +0100 Subject: [PATCH 04/16] Try to fix formatting in prior math with space --- doc/v2/documentation_data_format.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 0d7bd750..a4a900d2 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -610,10 +610,10 @@ Detailed field description `log10`). Optionally, a *truncated* distribution can be specified for any distribution - except the uniform distributions by providing a lower and upper bound after + except the uniform distributions by providing a lower and upper bound after the prior parameters. For example, a truncated normal distribution would be - defined with parameters ``mean;std;lb;ub``, where ``lb`` and ``ub`` are the - lower and upper bounds, respectively. For a truncated distribution, both the + defined with parameters ``mean;std;lb;ub``, where ``lb`` and ``ub`` are the + lower and upper bounds, respectively. For a truncated distribution, both the lower and upper bounds must be provided. So far, only numeric values are supported, no parameter names. Parameters for @@ -659,49 +659,57 @@ are used for the supported priors: .. math:: \pi(x|\mu, \sigma) = \frac{1}{\pi \sigma \left( 1 + \left(\frac{x - \mu}{\sigma} \right)^2\right)} \quad x \in (-\infty, \infty) -- *chisquare*, : +- *chisquare*: + - parameter: degree of freedom = :math:`\nu` .. math:: \pi(x|\nu) = \frac{x^{\nu/2-1}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)}, \quad x \in (0, \infty) - *exponential*: + - parameter: scale = :math:`\theta` .. math:: \pi(x|\theta) = \frac{1}{\theta}e^{-x/\theta} \quad x \in (0, \infty) - *gamma*: + - parameters: (shape, scale) = :math:`(\alpha, \theta)` .. math:: \pi(x|\alpha, \theta) = \frac{x^{\alpha - 1}e^{-x/\theta}}{\Gamma(\alpha)\theta^{\alpha}}, \quad x \in (0, \infty) - *laplace*: + - parameters: (location, scale) = :math:`(\mu, \sigma)` .. math:: \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right), \quad x \in (-\infty, \infty) - *logNormal*: + - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` .. math:: \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma} \exp\left(- \frac{\left(\log(x) - \mu\right)^2}{2\sigma^2}\right) \quad x \in (0, \infty) - *normal*: + - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` .. math:: \pi(x|\mu,\sigma) = \frac{1}{\sqrt{2\pi}\sigma}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \quad x \in (-\infty, \infty) - *rayleigh*: + - parameter: scale = :math:`\sigma` .. math:: \pi(x|\sigma) = \frac{x}{\sigma^2}\exp\left(\frac{-x^2}{2\sigma^2}\right) \quad x \in (0, \infty) - *uniform*: + - parameters: (lower bound, upper bound) = :math:`(a, b)` .. math:: From 6b290cd897164d3007cbc25486ee74589e4a28ec Mon Sep 17 00:00:00 2001 From: sebapersson Date: Tue, 18 Feb 2025 11:08:17 +0100 Subject: [PATCH 05/16] Minor formatting updates --- doc/v2/documentation_data_format.rst | 30 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index a4a900d2..1219d5b6 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -583,21 +583,25 @@ Detailed field description and ``upperBound``. Otherwise, points are sampled directly from the truncated distribution. The default is ``parameterScaleUniform``. - Possible prior types are (for mathematical definition see below): + Possible prior types on linear parameter scale are (for mathematical + definition see below): - - *cauchy*, Cauchy prior on linear parameters - - *chisquare*, Chisquare prior on linear parameters - - *exponential*, Exponential prior on linear parameters - - *gamma*, Gamma prior on linear parameters + - *cauchy*: Cauchy prior on linear parameters + - *chisquare*: Chisquare prior on linear parameters + - *exponential*: Exponential prior on linear parameters + - *gamma*: Gamma prior on linear parameters - *laplace*: Laplace prior on linear parameters - *logNormal*: exponentiated Gaussian prior on linear parameters - *normal*: Gaussian prior on linear parameters - *rayleigh*, Rayleigh prior on linear parameters - *uniform*: Flat prior on linear parameters - - *parameterScaleCauchy*, Cauchy prior on original parameter scale + + Supported priors on the scale defined via ``parameterScale`` are: + + - *parameterScaleCauchy*: Cauchy prior on original parameter scale - *parameterScaleLaplace*: Laplace prior on original parameter scale - *parameterScaleNormal*: Gaussian prior on original parameter scale - - *parameterScaleUniform* (default): Flat prior on original parameter + - *parameterScaleUniform*: (default): Flat prior on original parameter scale (equivalent to "no prior") - ``initializationPriorParameters`` [STRING, OPTIONAL] @@ -619,16 +623,16 @@ Detailed field description So far, only numeric values are supported, no parameter names. Parameters for the different prior types are: - - *cauchy*, location; scale - - *chisquare*, degrees of freedom - - *exponential*, rate - - *gamma*, shape; scale + - *cauchy*: location; scale + - *chisquare*: degrees of freedom + - *exponential*: rate + - *gamma*: shape; scale - *laplace*: location; scale - *logNormal*: parameters of corresp. normal distribution (see: normal) - *normal*: mean; standard deviation (**not** variance) - - *rayleigh*, scale + - *rayleigh*: scale - *uniform*: lower bound; upper bound - - *parameterScaleCauchy*, location; scale + - *parameterScaleCauchy*: location; scale - *parameterScaleLaplace*: location; scale - *parameterScaleNormal*: mean; standard deviation (**not** variance) - *parameterScaleUniform*: lower bound; upper bound From 77c3c3ef0a60428d06f29926460118e66b57ae23 Mon Sep 17 00:00:00 2001 From: sebapersson Date: Fri, 28 Mar 2025 14:14:42 +0000 Subject: [PATCH 06/16] Update prior spec --- doc/v2/documentation_data_format.rst | 121 ++++++++++++++------------- 1 file changed, 65 insertions(+), 56 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 30691f75..681079d2 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -153,8 +153,8 @@ PEtab 2.0.0 is a major update of the PEtab format. The main changes are: the PEtab format. * The admissible values for ``estimate`` in the :ref:`v2_parameters_table` are now ``true`` and ``false`` instead of ``1`` and ``0``. -* Support for new initializationPriorType and objectivePriorType distributions, - as well as support for truncated distributions. +* Support for new ``prior`` distributions, as well as support for + truncated distributions in the :ref:`v2_parameters_table`. .. _v2_model: .. _v2_model_entities: @@ -794,72 +794,60 @@ Detailed field description - ``prior`` [STRING, OPTIONAL] - Prior types used for the :ref:`MAP objective function and for Bayesian inference `. + Prior types used for the + :ref:`MAP objective function and for Bayesian inference `. It is valid to have no priors. However, if priors are specified for a subset of parameters, this defaults to the ``uniform`` prior (with ``priorParameters`` set to ``lowerBound;upperBound``) for the other parameters. - Possible prior types on linear parameter scale are (for mathematical - definition see below): - - - *cauchy*: Cauchy prior on linear parameters - - *chisquare*: Chisquare prior on linear parameters - - *exponential*: Exponential prior on linear parameters - - *gamma*: Gamma prior on linear parameters - - *laplace*: Laplace prior on linear parameters - - *logNormal*: exponentiated Gaussian prior on linear parameters - - *normal*: Gaussian prior on linear parameters - - *rayleigh*, Rayleigh prior on linear parameters - - *uniform*: Flat prior on linear parameters - - Supported priors on the scale defined via ``parameterScale`` are: - - - *parameterScaleCauchy*: Cauchy prior on original parameter scale - - *parameterScaleLaplace*: Laplace prior on original parameter scale - - *parameterScaleNormal*: Gaussian prior on original parameter scale - - *parameterScaleUniform*: (default): Flat prior on original parameter - scale (equivalent to "no prior") - -- ``initializationPriorParameters`` [STRING, OPTIONAL] - - Prior parameters used for the :ref:`MAP objective function and for Bayesian inference `. + Prior distributions are truncated by the ``lowerBound`` and ``upperBound`` if + the prior's domain is outside the parameter bounds. A non-truncated prior can + be created by setting the parameter bounds to match the prior's domain + (e.g., ``0`` and ``inf`` for ``logNormal``). + + Possible prior types are (mathematical definition below): + + - *cauchy*: Cauchy prior + - *chisquare*: Chisquare prior + - *exponential*: Exponential prior + - *gamma*: Gamma prior + - *laplace*: Laplace prior + - *log10Normal*: Log10-normal prior + - *logLaplace*: Log-Laplace prior + - *logNormal*: Log-normal prior + - *logUniform*: Log-uniform prior + - *normal*: Normal prior + - *rayleigh*, Rayleigh prior + - *uniform*: Flat (uniform) prior + +- ``priorParameters`` [STRING, OPTIONAL] + + Prior parameters used for the + :ref:`MAP objective function and for Bayesian inference `. ``priorParameters`` is required if ``prior`` is non-empty. - So far, only numeric values will be supported, no parameter names. + So far, only numeric values are supported, no parameter names. Parameters for the different prior types are: - - *cauchy*: location; scale - - *chisquare*: degrees of freedom - - *exponential*: rate - - *gamma*: shape; scale - - *laplace*: location; scale - - *logNormal*: parameters of corresp. normal distribution (see: normal) - - *normal*: mean; standard deviation (**not** variance) - - *rayleigh*: scale - - *uniform*: lower bound; upper bound - - *parameterScaleCauchy*: location; scale - - *parameterScaleLaplace*: location; scale - - *parameterScaleNormal*: mean; standard deviation (**not** variance) - - *parameterScaleUniform*: lower bound; upper bound - -- ``objectivePriorType`` [STRING, OPTIONAL] - - Prior types used for the objective function during estimation. - For possible values, see ``initializationPriorType``. - -- ``objectivePriorParameters`` [STRING, OPTIONAL] - - Prior parameters used for the objective function during estimation. - For more detailed documentation, see ``initializationPriorParameters``. - As for initialization priors, truncated priors are allowed. + - *cauchy*: location; scale + - *chisquare*: degrees of freedom + - *exponential*: rate + - *gamma*: shape; scale + - *laplace*: location; scale + - *log10Normal*: parameters of corresponding normal distribution (see normal) + - *logLaplace*: parameters of corresponding Laplace distribution (see laplace) + - *logNormal*: parameters of corresponding normal distribution (see normal) + - *logUniform*: parameters of corresponding uniform distribution (see uniform) + - *normal*: mean; standard deviation (**not** variance) + - *rayleigh*: scale + - *uniform*: lower bound; upper bound Prior distributions ~~~~~~~~~~~~~~~~~~~ -For ``initializationPriorType`` and ``objectivePriorType`` several -distributions are supported (see above). Denote the parameter value by :math:`x` -and the Gamma function by :math:`\Gamma`; then, the following parameterizations -are used for the supported priors: +For ``prior`` several distributions are supported (see above). Denote the parameter +value by :math:`x` and the Gamma function by :math:`\Gamma`; then, the +following parameterizations are used: - *cauchy*: @@ -896,6 +884,20 @@ are used for the supported priors: .. math:: \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right), \quad x \in (-\infty, \infty) +- *log10Normal*: + + - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` + + .. math:: + \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma \log(10)} \exp\left(- \frac{\left(\log_{10}(x) - \mu\right)^2}{2\sigma^2}\right) \quad x \in (0, \infty) + +- *logLaplace*: + + - parameters: (location, scale) = :math:`(\mu, \sigma)` + + .. math:: + \pi(x|\mu, \sigma) = \frac{1}{2\sigma x} \exp\left( - \frac{|\log(x) - \mu|}{\sigma} \right), \quad x \in (0, \infty) + - *logNormal*: - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` @@ -903,6 +905,13 @@ are used for the supported priors: .. math:: \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma} \exp\left(- \frac{\left(\log(x) - \mu\right)^2}{2\sigma^2}\right) \quad x \in (0, \infty) +- *logUniform*: + + - parameters: (lower bound, upper bound) = :math:`(a, b)` + + .. math:: + \pi(x|a, b) = \frac{1}{x\left( \log(b) - \log(a) \right)} \quad x \in (0, \infty) + - *normal*: - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` From 56aa3c6f40f522146f52551669bafae5434f6b3f Mon Sep 17 00:00:00 2001 From: Sebastian Persson <46872750+sebapersson@users.noreply.github.com> Date: Fri, 28 Mar 2025 15:13:19 +0000 Subject: [PATCH 07/16] Apply suggestions from code review Co-authored-by: Daniel Weindl --- doc/v2/documentation_data_format.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 681079d2..19dd6130 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -153,8 +153,7 @@ PEtab 2.0.0 is a major update of the PEtab format. The main changes are: the PEtab format. * The admissible values for ``estimate`` in the :ref:`v2_parameters_table` are now ``true`` and ``false`` instead of ``1`` and ``0``. -* Support for new ``prior`` distributions, as well as support for - truncated distributions in the :ref:`v2_parameters_table`. +* Support for new ``prior`` distributions in the :ref:`v2_parameters_table`, and clarification that bounds truncate the prior distributions. .. _v2_model: .. _v2_model_entities: @@ -801,7 +800,7 @@ Detailed field description set to ``lowerBound;upperBound``) for the other parameters. Prior distributions are truncated by the ``lowerBound`` and ``upperBound`` if - the prior's domain is outside the parameter bounds. A non-truncated prior can + the prior's domain exceeds the parameter bounds. A non-truncated prior can be created by setting the parameter bounds to match the prior's domain (e.g., ``0`` and ``inf`` for ``logNormal``). @@ -826,7 +825,7 @@ Detailed field description :ref:`MAP objective function and for Bayesian inference `. ``priorParameters`` is required if ``prior`` is non-empty. - So far, only numeric values are supported, no parameter names. + Only numeric values are supported, no parameter names. Parameters for the different prior types are: - *cauchy*: location; scale From 0885df39f566a8b784665132b957251d9ab6468a Mon Sep 17 00:00:00 2001 From: sebapersson Date: Fri, 28 Mar 2025 15:18:45 +0000 Subject: [PATCH 08/16] Change prior to priorDistribution --- doc/v2/documentation_data_format.rst | 32 +++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 19dd6130..8127b277 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -148,12 +148,14 @@ PEtab 2.0.0 is a major update of the PEtab format. The main changes are: priors are outside the definition of the parameter estimation problem and were a source of confusion. * ``objectivePriorType`` and ``objectivePriorParameters`` in the - :ref:`v2_parameters_table` are renamed to ``prior`` and + :ref:`v2_parameters_table` are renamed to ``priorDistribution`` and ``priorParameters``, respectively. This change was made to simplify the PEtab format. * The admissible values for ``estimate`` in the :ref:`v2_parameters_table` are now ``true`` and ``false`` instead of ``1`` and ``0``. -* Support for new ``prior`` distributions in the :ref:`v2_parameters_table`, and clarification that bounds truncate the prior distributions. +* Support for new ``priorDistribution`` distributions in the + :ref:`v2_parameters_table`, and clarification that bounds truncate the + prior distributions. .. _v2_model: .. _v2_model_entities: @@ -740,15 +742,15 @@ One row per parameter with arbitrary order of rows and columns: *(wrapped for readability)* -+-----+----------------+----------------------------+ -| ... | [prior] | [priorParameters] | -+=====+================+============================+ -| ... | *see below* | *see below* | -+-----+----------------+----------------------------+ -| ... | normal | 1000;100 | -+-----+----------------+----------------------------+ -| ... | ... | ... | -+-----+----------------+----------------------------+ ++-----+-------------------------+----------------------------+ +| ... | [priorDistribution] | [priorParameters] | ++=====+=========================+============================+ +| ... | *see below* | *see below* | ++-----+-------------------------+----------------------------+ +| ... | normal | 1000;100 | ++-----+-------------------------+----------------------------+ +| ... | ... | ... | ++-----+-------------------------+----------------------------+ Additional columns may be added. @@ -791,7 +793,7 @@ Detailed field description estimated (``true``) or set to a fixed value (``false``) (see ``nominalValue``). -- ``prior`` [STRING, OPTIONAL] +- ``priorDistribution`` [STRING, OPTIONAL] Prior types used for the :ref:`MAP objective function and for Bayesian inference `. @@ -823,7 +825,7 @@ Detailed field description Prior parameters used for the :ref:`MAP objective function and for Bayesian inference `. - ``priorParameters`` is required if ``prior`` is non-empty. + ``priorParameters`` is required if ``priorDistribution`` is non-empty. Only numeric values are supported, no parameter names. Parameters for the different prior types are: @@ -844,7 +846,7 @@ Detailed field description Prior distributions ~~~~~~~~~~~~~~~~~~~ -For ``prior`` several distributions are supported (see above). Denote the parameter +For ``priorDistribution`` several distributions are supported (see above). Denote the parameter value by :math:`x` and the Gamma function by :math:`\Gamma`; then, the following parameterizations are used: @@ -1166,7 +1168,7 @@ and `Bayesian inference `__. For MAP estimation and Bayesian inference, the prior distributions :math:`p(\theta)` of the model parameters :math:`\theta` are specified in the parameter table -(``prior`` and ``priorParameters`` columns, +(``priorDistribution`` and ``priorParameters`` columns, as described above), while for maximum likelihood estimation, the prior distributions are not specified. If priors are only specified From bcbe8ebe18c7532a7365e64899af469842ca2dbb Mon Sep 17 00:00:00 2001 From: Sebastian Persson <46872750+sebapersson@users.noreply.github.com> Date: Fri, 28 Mar 2025 15:50:10 +0000 Subject: [PATCH 09/16] Apply suggestions from code review Co-authored-by: Daniel Weindl --- doc/v2/documentation_data_format.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 8127b277..7f8dc7f2 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -153,7 +153,7 @@ PEtab 2.0.0 is a major update of the PEtab format. The main changes are: the PEtab format. * The admissible values for ``estimate`` in the :ref:`v2_parameters_table` are now ``true`` and ``false`` instead of ``1`` and ``0``. -* Support for new ``priorDistribution`` distributions in the +* Support for new parameter prior distributions in the :ref:`v2_parameters_table`, and clarification that bounds truncate the prior distributions. @@ -859,7 +859,7 @@ following parameterizations are used: - *chisquare*: - - parameter: degree of freedom = :math:`\nu` + - parameter: degrees of freedom = :math:`\nu` .. math:: \pi(x|\nu) = \frac{x^{\nu/2-1}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)}, \quad x \in (0, \infty) From 79f69652785ac314329c421231932397410c41d5 Mon Sep 17 00:00:00 2001 From: sebapersson Date: Fri, 28 Mar 2025 15:52:32 +0000 Subject: [PATCH 10/16] Fix inconsistent comma in prior math --- 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 7f8dc7f2..f5c9ace4 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -862,7 +862,7 @@ following parameterizations are used: - parameter: degrees of freedom = :math:`\nu` .. math:: - \pi(x|\nu) = \frac{x^{\nu/2-1}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)}, \quad x \in (0, \infty) + \pi(x|\nu) = \frac{x^{\nu/2-1}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)} \quad x \in (0, \infty) - *exponential*: @@ -876,14 +876,14 @@ following parameterizations are used: - parameters: (shape, scale) = :math:`(\alpha, \theta)` .. math:: - \pi(x|\alpha, \theta) = \frac{x^{\alpha - 1}e^{-x/\theta}}{\Gamma(\alpha)\theta^{\alpha}}, \quad x \in (0, \infty) + \pi(x|\alpha, \theta) = \frac{x^{\alpha - 1}e^{-x/\theta}}{\Gamma(\alpha)\theta^{\alpha}} \quad x \in (0, \infty) - *laplace*: - parameters: (location, scale) = :math:`(\mu, \sigma)` .. math:: - \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right), \quad x \in (-\infty, \infty) + \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right) \quad x \in (-\infty, \infty) - *log10Normal*: @@ -897,7 +897,7 @@ following parameterizations are used: - parameters: (location, scale) = :math:`(\mu, \sigma)` .. math:: - \pi(x|\mu, \sigma) = \frac{1}{2\sigma x} \exp\left( - \frac{|\log(x) - \mu|}{\sigma} \right), \quad x \in (0, \infty) + \pi(x|\mu, \sigma) = \frac{1}{2\sigma x} \exp\left( - \frac{|\log(x) - \mu|}{\sigma} \right) \quad x \in (0, \infty) - *logNormal*: From d4da964d51b975e978d7f08bc7876bdded2b9e47 Mon Sep 17 00:00:00 2001 From: Sebastian Persson <46872750+sebapersson@users.noreply.github.com> Date: Sat, 29 Mar 2025 09:08:24 +0000 Subject: [PATCH 11/16] Update doc/v2/documentation_data_format.rst Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- doc/v2/documentation_data_format.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index f5c9ace4..c302bb25 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -827,7 +827,7 @@ Detailed field description :ref:`MAP objective function and for Bayesian inference `. ``priorParameters`` is required if ``priorDistribution`` is non-empty. - Only numeric values are supported, no parameter names. + Only numeric values are supported (no parameter IDs). Parameters for the different prior types are: - *cauchy*: location; scale From ebd53eef14884662f227baecdbaa78f678a80bc9 Mon Sep 17 00:00:00 2001 From: sebapersson Date: Sat, 5 Apr 2025 14:25:20 +0100 Subject: [PATCH 12/16] Add table for prior distributions --- doc/v2/documentation_data_format.rst | 220 ++++++++++++--------------- 1 file changed, 96 insertions(+), 124 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index c302bb25..9fadb9c9 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -153,8 +153,8 @@ PEtab 2.0.0 is a major update of the PEtab format. The main changes are: the PEtab format. * The admissible values for ``estimate`` in the :ref:`v2_parameters_table` are now ``true`` and ``false`` instead of ``1`` and ``0``. -* Support for new parameter prior distributions in the - :ref:`v2_parameters_table`, and clarification that bounds truncate the +* Support for new parameter prior distributions in the + :ref:`v2_parameters_table`, and clarification that bounds truncate the prior distributions. .. _v2_model: @@ -795,144 +795,116 @@ Detailed field description - ``priorDistribution`` [STRING, OPTIONAL] - Prior types used for the + Prior types used for the :ref:`MAP objective function and for Bayesian inference `. It is valid to have no priors. However, if priors are specified for a subset of parameters, this defaults to the ``uniform`` prior (with ``priorParameters`` set to ``lowerBound;upperBound``) for the other parameters. - Prior distributions are truncated by the ``lowerBound`` and ``upperBound`` if - the prior's domain exceeds the parameter bounds. A non-truncated prior can - be created by setting the parameter bounds to match the prior's domain - (e.g., ``0`` and ``inf`` for ``logNormal``). - - Possible prior types are (mathematical definition below): - - - *cauchy*: Cauchy prior - - *chisquare*: Chisquare prior - - *exponential*: Exponential prior - - *gamma*: Gamma prior - - *laplace*: Laplace prior - - *log10Normal*: Log10-normal prior - - *logLaplace*: Log-Laplace prior - - *logNormal*: Log-normal prior - - *logUniform*: Log-uniform prior - - *normal*: Normal prior - - *rayleigh*, Rayleigh prior - - *uniform*: Flat (uniform) prior + Prior distributions are + `truncated ` + by the ``lowerBound`` and ``upperBound`` if + the prior's domain exceeds the parameter bounds. A non-truncated prior can + be created by setting the parameter bounds to match the prior's domain + (e.g., ``0`` and ``inf`` for ``logNormal``). For supported prior distributions + see :ref:`prior distributions `. - ``priorParameters`` [STRING, OPTIONAL] - Prior parameters used for the + Prior parameters used for the :ref:`MAP objective function and for Bayesian inference `. ``priorParameters`` is required if ``priorDistribution`` is non-empty. - Only numeric values are supported (no parameter IDs). - Parameters for the different prior types are: - - - *cauchy*: location; scale - - *chisquare*: degrees of freedom - - *exponential*: rate - - *gamma*: shape; scale - - *laplace*: location; scale - - *log10Normal*: parameters of corresponding normal distribution (see normal) - - *logLaplace*: parameters of corresponding Laplace distribution (see laplace) - - *logNormal*: parameters of corresponding normal distribution (see normal) - - *logUniform*: parameters of corresponding uniform distribution (see uniform) - - *normal*: mean; standard deviation (**not** variance) - - *rayleigh*: scale - - *uniform*: lower bound; upper bound + Only numeric values are supported (no parameter IDs). For available + parameters see :ref:`prior distributions `. + +.. _v2_prior_distributions: Prior distributions ~~~~~~~~~~~~~~~~~~~ -For ``priorDistribution`` several distributions are supported (see above). Denote the parameter -value by :math:`x` and the Gamma function by :math:`\Gamma`; then, the -following parameterizations are used: - -- *cauchy*: - - - parameters: (location, scale) = :math:`(\mu, \sigma)` - - .. math:: - \pi(x|\mu, \sigma) = \frac{1}{\pi \sigma \left( 1 + \left(\frac{x - \mu}{\sigma} \right)^2\right)} \quad x \in (-\infty, \infty) - -- *chisquare*: - - - parameter: degrees of freedom = :math:`\nu` - - .. math:: - \pi(x|\nu) = \frac{x^{\nu/2-1}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)} \quad x \in (0, \infty) - -- *exponential*: - - - parameter: scale = :math:`\theta` - - .. math:: - \pi(x|\theta) = \frac{1}{\theta}e^{-x/\theta} \quad x \in (0, \infty) - -- *gamma*: - - - parameters: (shape, scale) = :math:`(\alpha, \theta)` - - .. math:: - \pi(x|\alpha, \theta) = \frac{x^{\alpha - 1}e^{-x/\theta}}{\Gamma(\alpha)\theta^{\alpha}} \quad x \in (0, \infty) - -- *laplace*: - - - parameters: (location, scale) = :math:`(\mu, \sigma)` - - .. math:: - \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right) \quad x \in (-\infty, \infty) - -- *log10Normal*: - - - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` - - .. math:: - \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma \log(10)} \exp\left(- \frac{\left(\log_{10}(x) - \mu\right)^2}{2\sigma^2}\right) \quad x \in (0, \infty) +Let :math:`x` denote the parameter value and :math:`\Gamma` the Gamma function, +then the following prior distributions are supported: -- *logLaplace*: - - - parameters: (location, scale) = :math:`(\mu, \sigma)` - - .. math:: - \pi(x|\mu, \sigma) = \frac{1}{2\sigma x} \exp\left( - \frac{|\log(x) - \mu|}{\sigma} \right) \quad x \in (0, \infty) - -- *logNormal*: - - - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` - - .. math:: - \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma} \exp\left(- \frac{\left(\log(x) - \mu\right)^2}{2\sigma^2}\right) \quad x \in (0, \infty) - -- *logUniform*: - - - parameters: (lower bound, upper bound) = :math:`(a, b)` - - .. math:: - \pi(x|a, b) = \frac{1}{x\left( \log(b) - \log(a) \right)} \quad x \in (0, \infty) - -- *normal*: - - - parameters: (mean, standard deviation) = :math:`(\mu, \sigma)` - - .. math:: - \pi(x|\mu,\sigma) = \frac{1}{\sqrt{2\pi}\sigma}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \quad x \in (-\infty, \infty) - -- *rayleigh*: - - - parameter: scale = :math:`\sigma` - - .. math:: - \pi(x|\sigma) = \frac{x}{\sigma^2}\exp\left(\frac{-x^2}{2\sigma^2}\right) \quad x \in (0, \infty) - -- *uniform*: - - - parameters: (lower bound, upper bound) = :math:`(a, b)` - - .. math:: - \pi(x|a, b) = \frac{1}{b - a} \quad x \in [a, b] +.. list-table:: + :header-rows: 1 + :widths: 10 15 20 5 + + * - ``priorDistribution`` + - ``priorParameters`` + - PDF + - Domain + * - cauchy + - location (:math:`\mu`); scale (:math:`\sigma`) + - .. math:: + \pi(x|\mu, \sigma) = \frac{1}{\pi \sigma \left( 1 + \left(\frac{x - \mu}{\sigma} \right)^2\right)} + - :math:`(-\infty, \infty)` + + * - chisquare + - degrees of freedom (:math:`\nu`) + - .. math:: + \pi(x|\nu) = \frac{x^{\nu/2-1}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)} + - :math:`(0, \infty)` + + * - exponential + - scale (:math:`\theta`) + - .. math:: + \pi(x|\theta) = \frac{1}{\theta}e^{-x/\theta} + - :math:`(0, \infty)` + + * - gamma + - shape (:math:`\alpha`); scale (:math:`\theta`) + - .. math:: + \pi(x|\alpha, \theta) = \frac{x^{\alpha - 1}e^{-x/\theta}}{\Gamma(\alpha)\theta^{\alpha}} + - :math:`(-\infty, \infty)` + + * - laplace + - location (:math:`\mu`); scale (:math:`\sigma`) + - .. math:: + \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right) \quad x \in (-\infty, \infty) + - :math:`(-\infty, \infty)` + + * - log10Normal + - mean (:math:`\mu`); standard deviation (:math:`\sigma`) + - .. math:: + \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma \log(10)} \exp\left(- \frac{\left(\log_{10}(x) - \mu\right)^2}{2\sigma^2}\right) + - :math:`(0, \infty)` + + * - logLaplace + - location (:math:`\mu`); scale (:math:`\sigma`) + - .. math:: + \pi(x|\mu, \sigma) = \frac{1}{2\sigma x} \exp\left( - \frac{|\log(x) - \mu|}{\sigma} \right) + - :math:`(0, \infty)` + + * - logNormal + - mean (:math:`\mu`); standard deviation (:math:`\sigma`) + - .. math:: + \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma} \exp\left(- \frac{\left(\log(x) - \mu\right)^2}{2\sigma^2}\right) + - :math:`(0, \infty)` + + * - logUniform + - lower bound (:math:`a`); upper bound (:math:`b`) + - .. math:: + \pi(x|a, b) = \frac{1}{x\left( \log(b) - \log(a) \right)} + - :math:`[a, b]` + + * - normal + - mean (:math:`\mu`); standard deviation (:math:`\sigma`) + - .. math:: + \pi(x|\mu,\sigma) = \frac{1}{\sqrt{2\pi}\sigma}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) + - :math:`(-\infty, \infty)` + + * - rayleigh + - scale (:math:`\sigma`) + - .. math:: + \pi(x|\sigma) = \frac{x}{\sigma^2}\exp\left(\frac{-x^2}{2\sigma^2}\right) + - :math:`(0, \infty)` + + * - uniform + - lower bound (:math:`a`); upper bound (:math:`b`) + - .. math:: + \pi(x|a, b) = \frac{1}{b - a} + - :math:`[a, b]` .. _v2_visualization_table: From cedfccfd9e900174b3b55266f3f3950208a33941 Mon Sep 17 00:00:00 2001 From: Sebastian Persson <46872750+sebapersson@users.noreply.github.com> Date: Sat, 5 Apr 2025 20:41:01 +0100 Subject: [PATCH 13/16] Update doc/v2/documentation_data_format.rst Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- doc/v2/documentation_data_format.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 9fadb9c9..5f936ede 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -861,7 +861,7 @@ then the following prior distributions are supported: * - laplace - location (:math:`\mu`); scale (:math:`\sigma`) - .. math:: - \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right) \quad x \in (-\infty, \infty) + \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right) - :math:`(-\infty, \infty)` * - log10Normal From bb98f2684505e3adc1ac8b9da78cc681c0d17812 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 23 Apr 2025 08:21:36 +0200 Subject: [PATCH 14/16] fix rst --- 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 3e4b6273..31a4dcc2 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -815,7 +815,7 @@ Detailed field description :ref:`MAP objective function and for Bayesian inference `. ``priorParameters`` is required if ``priorDistribution`` is non-empty. - Only numeric values are supported (no parameter IDs). For available + Only numeric values are supported (no parameter IDs). For available parameters see :ref:`prior distributions `. .. _v2_prior_distributions: @@ -827,12 +827,12 @@ Let :math:`x` denote the parameter value and :math:`\Gamma` the Gamma function, then the following prior distributions are supported: .. list-table:: - :header-rows: 1 - :widths: 10 15 20 5 + :header-rows: 1 + :widths: 10 15 20 5 * - ``priorDistribution`` - ``priorParameters`` - - PDF + - Probability density function (PDF) - Domain * - cauchy - location (:math:`\mu`); scale (:math:`\sigma`) From bb6548d4928ea9c49be7a3a57b1cae7cdf1ccda9 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 23 Apr 2025 08:25:18 +0200 Subject: [PATCH 15/16] log- --- doc/v2/documentation_data_format.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 31a4dcc2..090b0fc3 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -806,7 +806,7 @@ Detailed field description by the ``lowerBound`` and ``upperBound`` if the prior's domain exceeds the parameter bounds. A non-truncated prior can be created by setting the parameter bounds to match the prior's domain - (e.g., ``0`` and ``inf`` for ``logNormal``). For supported prior distributions + (e.g., ``0`` and ``inf`` for ``log-normal``). For supported prior distributions see :ref:`prior distributions `. - ``priorParameters`` [STRING, OPTIONAL] @@ -864,25 +864,25 @@ then the following prior distributions are supported: \pi(x|\mu, \sigma) = \frac{1}{2\sigma}\exp\left(- \frac{|x - \mu |}{\sigma}\right) - :math:`(-\infty, \infty)` - * - log10Normal + * - log10-normal - mean (:math:`\mu`); standard deviation (:math:`\sigma`) - .. math:: \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma \log(10)} \exp\left(- \frac{\left(\log_{10}(x) - \mu\right)^2}{2\sigma^2}\right) - :math:`(0, \infty)` - * - logLaplace + * - log-laplace - location (:math:`\mu`); scale (:math:`\sigma`) - .. math:: \pi(x|\mu, \sigma) = \frac{1}{2\sigma x} \exp\left( - \frac{|\log(x) - \mu|}{\sigma} \right) - :math:`(0, \infty)` - * - logNormal + * - log-normal - mean (:math:`\mu`); standard deviation (:math:`\sigma`) - .. math:: \pi(x|\mu, \sigma) = \frac{1}{x \sqrt{2\pi}\sigma} \exp\left(- \frac{\left(\log(x) - \mu\right)^2}{2\sigma^2}\right) - :math:`(0, \infty)` - * - logUniform + * - log-uniform - lower bound (:math:`a`); upper bound (:math:`b`) - .. math:: \pi(x|a, b) = \frac{1}{x\left( \log(b) - \log(a) \right)} From 1d954fe7013364fa0e08987713520ceab45d0e84 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 23 Apr 2025 08:29:25 +0200 Subject: [PATCH 16/16] fix rst --- doc/v2/documentation_data_format.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/v2/documentation_data_format.rst b/doc/v2/documentation_data_format.rst index 090b0fc3..f423f493 100644 --- a/doc/v2/documentation_data_format.rst +++ b/doc/v2/documentation_data_format.rst @@ -802,7 +802,7 @@ Detailed field description set to ``lowerBound;upperBound``) for the other parameters. Prior distributions are - `truncated ` + `truncated `__ by the ``lowerBound`` and ``upperBound`` if the prior's domain exceeds the parameter bounds. A non-truncated prior can be created by setting the parameter bounds to match the prior's domain