Should Distributions have two transform kwargs? #5404
Replies: 4 comments 5 replies
-
I think this makes sense to change the default. I'm a bit concerned about the case where I set |
Beta Was this translation helpful? Give feedback.
-
So IIUC the second transform kwarg is to specify additional transformation, so we have |
Beta Was this translation helpful? Give feedback.
-
This is also relevant for prior predictive. If we have the distinction we could easily switch to NUTS for doing prior predictive when model contains non-default transformations. This makes transforms like |
Beta Was this translation helpful? Give feedback.
-
Seems like we should make a decision here and it sounds like there are good arguments for and not very good arguments against. |
Beta Was this translation helpful? Give feedback.
-
When users specify a transform (e.g. Ordered, LocScale(TBA)) on a distribution that has a default transform (e.g., Log), they usually end up missing/forgetting the latter and sampling becomes flaky.
The safe thing would be to chain the two transforms, but this is a bit verbose if done manually and most users are not even aware there is a default transform.
What if we convert the current
transform
kwarg todefault_transform
and maketransform
an optional additional transform that we automatically chain behind the scenes? Or call the newextra_transform
which is more verbose (most users would want to fiddle with this one) but backwards compatible.One other advantage is that we could warn users in prior predictive sampling as extra transforms almost always render the model different than forward sampling, similar to our Potentials warning
See:
#4721
#4213
#5277
Beta Was this translation helpful? Give feedback.
All reactions