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
Hello everybody,
I would like to write the LogitNormal function (suggested from here #2066) and add it to pymc3 as well, but I have some problems with ADVI which finds NaN. This could be caused by my model, or by this code where I need some help. Sorry to bother
ref: https://en.wikipedia.org/wiki/Logit-normal_distribution
class Logitnormal(PositiveContinuous):
def __init__(self, mu=0.5, tau=None, *args, **kwargs):
super(Logitnormal, self).__init__(*args, **kwargs)
self.mu = mu = tt.as_tensor_variable(mu)
self.tau = tau = tt.as_tensor_variable(tau)
self.median = logit(mu)
assert_negative_support(tau, 'tau', 'Logitnormal')
def logp(self, value):
mu = self.mu
tau = self.tau
return bound(-0.5 * tau * (logit(value) - mu)**2
+ 0.5 * tt.log(tau / (2. * np.pi))
- tt.log(value*(1-value)),value > 0, value <1, tau > 0)
The text was updated successfully, but these errors were encountered:
Hello everybody,
I would like to write the LogitNormal function (suggested from here #2066) and add it to pymc3 as well, but I have some problems with ADVI which finds NaN. This could be caused by my model, or by this code where I need some help. Sorry to bother
ref: https://en.wikipedia.org/wiki/Logit-normal_distribution
The text was updated successfully, but these errors were encountered: