-
Notifications
You must be signed in to change notification settings - Fork 246
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
Support constraints.cat and CatTransform #1872
Comments
Hi @adrn, for parameters with different domains, it is better to split them out, e.g. |
Thanks for the response! That makes sense. But hm, it's possible what I want to do is not supported at the moment. For my custom distribution, some pairs of the parameters are not independent and so I can't split them out easily. And some may have |
If you want to build a custom joint distribution then cat constraints and CatTransform might be helpful https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.CatTransform We can modify the title and make this a feature request I guess? |
We did something like this with the |
Hello!
I have a custom multi-dimensional distribution where the support may be truncated along some dimensions. In terms of constraints, some dimensions will either be
real
,greater_than
,less_than
, orinterval
. I naively was then implementing thesupport
as, e.g.:Right now, this is not really supported by the
numpyro.distributions.constraints.Interval
class because of howfeasible_like()
works, or how thescale
is computed in the unconstrained transform. Would you be open to making these things inf-safe? So far I instead implemented a custom subclassInfSafeInterval(constraints._Interval)
to support this, but thought I would check in on this. Thanks!The text was updated successfully, but these errors were encountered: