-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
stick breaking transform does not work for 2D vars #792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think we need to rewrite def forward(self, x):
#reverse cumsum
x0 = x[..., :-1]
s = t.extra_ops.cumsum(x0[::-1], axis=-1)[::-1] + x[...,[-1]]
z = x0/s
Km1 = x.shape[-1] - 1
k = arange(Km1)
eq_share = - t.log(Km1 - k) # logit(1./(Km1 + 1 - k))
y = logit(z) - eq_share
return y This doesn't quite work yet though. |
Good point. Yeah, this fits in with multivariate distributions needing a special axis. |
This was referenced Sep 30, 2015
Yes, I believe so. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
produces:
CC @jsalvatier
The text was updated successfully, but these errors were encountered: