Open torfjelde opened 1 year ago
This has come up quite a few times but fortunately the solution is easy: Use NaN-safe mode in ForwardDiff (by default, it does return incorrect result for infinite values with zero partials) or use the keyword argument syntax of truncated
(truncated(Normal(...); lower=0)
). The latter has the additional advantage that it avoids undesired promotions and, in the future, that you can dispatch on left- and right-truncated distributions (just opened a PR to Distributions a few days ago).
The following is currently the case:
IIRC, this has come up before? It comes down the usage of the
cdf
in the computation of the truncated log-pdf, which causes issues.@sethaxen did we talk about this over Slack at some point? Feel like there was a thread about this issue.