This PR implements two different ways to transform a vector of K(K-1)/2 real numbers to a Cholesky factor of a K x K correlation matrix, addressing #24:
I just want to make sure this is a sensible first step in the proposed workflow; I'll then address the other points raised in #24.
One thing I'm not sure about in the Stan implementation: as far as I understand, in this line we are accounting for the jacobian correction of the tanh transform, whereas in this line we do not; why is that? And, presumably, here we do want to account for that, right? (currently we do not, I need to change that).
This PR implements two different ways to transform a vector of
K(K-1)/2
real numbers to a Cholesky factor of aK x K
correlation matrix, addressing #24:Stan's way, based on https://github.com/stan-dev/math/blob/92075708b1d1796eb82e3b284cd11e544433518e/stan/math/rev/fun/cholesky_corr_constrain.hpp#L38-L52
TFP's way, based on https://github.com/tensorflow/probability/blob/v0.17.0/tensorflow_probability/python/bijectors/correlation_cholesky.py
I just want to make sure this is a sensible first step in the proposed workflow; I'll then address the other points raised in #24.
One thing I'm not sure about in the Stan implementation: as far as I understand, in this line we are accounting for the jacobian correction of the
tanh
transform, whereas in this line we do not; why is that? And, presumably, here we do want to account for that, right? (currently we do not, I need to change that).