distrib¶
The formulas of the distributions of the fitted parameters, without a simulator.
A fitted parameter carries the distribution of its draws as a formula of the
SBML package distrib (pkpdsim.uncertainty.ParameterUncertainty.distribution):
normal(mean, sd[, lower, upper]), lognormal(mu, sigma[, lower, upper])
(mu and sigma of the natural logarithm) and uniform(lower, upper), with
numbers as arguments, truncated to the bounds of the fit when they are
given. This module is the one grammar of these formulas: the draws of
pkpdsim.uncertainty parse them into the distributions of sbmlsim, and the
PBPK library reads their support to bound a fitted fraction (it must not
import a simulator).
ARGUMENTS
module-attribute
¶
The distributions and their numbers of arguments; the last two of four are the bounds of a truncation.
DistribFormula
dataclass
¶
A formula of a distribution of distrib.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
the distribution, a key of |
args |
tuple[float, ...]
|
the arguments. |
parse
¶
Parse a formula of a distribution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
formula
|
str
|
e.g. |
required |
Returns:
| Type | Description |
|---|---|
DistribFormula
|
The distribution and its arguments. |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the formula is no function of numbers, or no
distribution of |
support
¶
Get the support of a distribution: the values its draws can take.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
formula
|
str
|
the formula of the distribution. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The bounds of a truncated or uniform distribution; without bounds |
float
|
|
tuple[float, float]
|
|