Skip to content

Commit f5278d3

Browse files
committed
Revert "tuncation/transformation"
This reverts commit 7ae0f40.
1 parent 9e65449 commit f5278d3

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

petab/v1/distributions.py

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ def __init__(
7676
@property
7777
def trunc_low(self) -> float:
7878
"""The lower truncation limit of the transformed distribution."""
79-
return self._exp(self._trunc[0]) if self._trunc else -np.inf
79+
return self._trunc[0] if self._trunc else -np.inf
8080

8181
@property
8282
def trunc_high(self) -> float:
8383
"""The upper truncation limit of the transformed distribution."""
84-
return self._exp(self._trunc[1]) if self._trunc else np.inf
84+
return self._trunc[1] if self._trunc else np.inf
8585

8686
def _exp(self, x: np.ndarray | float) -> np.ndarray | float:
8787
"""Exponentiate / undo the log transformation if applicable.
@@ -275,17 +275,15 @@ class Normal(Distribution):
275275
:param loc: The location parameter of the distribution.
276276
:param scale: The scale parameter of the distribution.
277277
:param trunc: The truncation limits of the distribution.
278-
``None`` if the distribution is not truncated.
278+
``None`` if the distribution is not truncated. The truncation limits
279+
are the truncation limits of the transformed distribution.
279280
:param log: If ``True``, the distribution is transformed to a log-normal
280281
distribution. If a float, the distribution is transformed to a
281-
log-normal distribution with the given log-base.
282+
log-normal distribution with the given base.
282283
If ``False``, no transformation is applied.
283-
284-
.. note::
285-
286-
If a transformation is applied, the location and scale parameters
287-
and the truncation limits are the location, scale and truncation
288-
limits of the underlying normal distribution.
284+
If a transformation is applied, the location and scale parameters
285+
and the truncation limits are the location, scale and truncation limits
286+
of the underlying normal distribution.
289287
"""
290288

291289
def __init__(
@@ -336,11 +334,8 @@ class Uniform(Distribution):
336334
distribution. If a float, the distribution is transformed to a
337335
log-uniform distribution with the given base.
338336
If ``False``, no transformation is applied.
339-
340-
.. note::
341-
342-
If a transformation is applied, the lower and upper bounds are the
343-
lower and upper bounds of the underlying uniform distribution.
337+
If a transformation is applied, the lower and upper bounds are the
338+
lower and upper bounds of the underlying uniform distribution.
344339
"""
345340

346341
def __init__(
@@ -377,17 +372,15 @@ class Laplace(Distribution):
377372
:param loc: The location parameter of the distribution.
378373
:param scale: The scale parameter of the distribution.
379374
:param trunc: The truncation limits of the distribution.
380-
``None`` if the distribution is not truncated.
375+
``None`` if the distribution is not truncated. The truncation limits
376+
are the truncation limits of the transformed distribution.
381377
:param log: If ``True``, the distribution is transformed to a log-Laplace
382378
distribution. If a float, the distribution is transformed to a
383379
log-Laplace distribution with the given base.
384380
If ``False``, no transformation is applied.
385-
386-
.. note::
387-
388-
If a transformation is applied, the location and scale parameters
389-
and the truncation limits are the location, scale and truncation
390-
limits of the underlying Laplace distribution.
381+
If a transformation is applied, the location and scale parameters
382+
and the truncation limits are the location, scale and truncation limits
383+
of the underlying Laplace distribution.
391384
"""
392385

393386
def __init__(

0 commit comments

Comments
 (0)