@junpenglao Thanks. That’s helpful. What’s still confusing me is that the Transform class has both forward and backward methods. So shouldn’t a forward sampler like sample_posterior_predictive be able to use the random method for its parent transformed variable and then apply the forward transform on the resulting value?
I think the problem is mostly a documentation one – it’s not clear what role the forward and backward methods are intended to play, based on their docstrings.
It’s even a little confusing what is the “transformed” variable and what is “the variable that was transformed.” If you are a programmer, and you say transform=sorted then it seems like the variable in your program is the transformed variable, and the upstream variable, with the canonical support is the untransformed variable. Correct? You apply the transform forward to get the sorted variable from the unsorted one.
So I am still groping to try to see why it’s hard to do forward sampling with transformed RVs. Thanks for your patience.