You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Truncated distributions return NaN/inf when the truncation range lies far in the tail #607
If both truncation limits lie far enough in a tail that the untruncated CDF gives the same value at both (0 in the lower tail, 1.0 in the upper tail), the normalizer 1 / (F(trunc_high) - F(trunc_low)) divides by zero. This affects pdf, cdf, ppf and sample within the truncation range:
This is an edge case, but it can happen in petab.v2, because Parameter.prior_dist truncates priors at the parameter bounds, and those bounds can lie far in the tail of a narrow prior. Possible fixes: do the calculations in log space (logcdf/logsf), use the survival function for the upper tail, or at least raise an informative error in the constructor when the truncation range has (numerically) zero probability mass.
Activity