Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).