Open srvasude opened 4 years ago
Hi, I'll be happy to test this with the data from https://blogs.rstudio.com/tensorflow/posts/2019-05-24-varying-slopes/ (where I used LKJ(input_output_cholesky=True)
with the CorrelationCholesky
bijector) as soon as it's available on any branch :-)
I recently added a CholeskyLKJ, which you can try at head.
Thanks! I just updated the blog post to use it :-)
These names are subject to change, but basically mimicking what PyMC3: https://docs.pymc.io/api/distributions/multivariate.html#pymc3.distributions.multivariate.LKJCholeskyCov
and Stan: https://mc-stan.org/docs/2_19/functions-reference/cholesky-lkj-correlation-distribution.html
In practice you would want samples from a CholeskyLKJ because the computations are more numerically stable (as well as log_prob and other calculations). We have LKJ(input_output_cholesky=True) which takes the cholesky of all outputs, and assumes the inputs are the cholesky of something. This works great for sampling, but the log_prob does not contain a Jacobian correction term (which can lead to different / potentially unwanted behavior), as it simply takes LL^T of the input.