I am trying to make a callable function where a user can define the parameters of a distribution. I want to prevent any values from going below zero as there is a tt.log operation inside this function.
I was therefore going to use the pm.Bound method to do:
bound_N = pm.Bound(pm.Normal,lower=0)
There are two issues:
- The simple bound_N above gives divergencies for any parameters i.e
bound_N('N',mu=3,sd=2)unless target_accept is raised to i.e 0.9
- The result of this bounded normal is completely off if the mean (mu) is set to a large number. For example using:
bound_N('N',mu=1e5,sd=20) gives the below graph. (having mu=1e4 seems to work)
Any explanation to this?