TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-08

CorrCholeskyTransform

class tensorplay.distributions.CorrCholeskyTransform(cache_size: int = 0)[source]

Transforms an unconstrained real vector xx with length D∗(D−1)/2D*(D-1)/2 into the Cholesky factor of a D-dimension correlation matrix. This Cholesky factor is a lower triangular matrix with positive diagonals and unit Euclidean norm for each row. The transform is processed as follows:

  1. First we convert x into a lower triangular matrix in row order.

  2. For each row XiX_i of the lower triangular part, we apply a signed version of class StickBreakingTransform to transform XiX_i into a unit Euclidean length vector using the following steps: - Scales into the interval (−1,1)(-1, 1) domain: ri=tanh⁡(Xi)r_i = \tanh(X_i). - Transforms into an unsigned domain: zi=ri2z_i = r_i^2. - Applies si=StickBreakingTransform(zi)s_i = StickBreakingTransform(z_i). - Transforms back into signed domain: yi=sign(ri)∗siy_i = sign(r_i) * \sqrt{s_i}.

property inv: Transform

Returns the inverse Transform of this transform. This should satisfy t.inv.inv is t.

property sign: int

Returns the sign of the determinant of the Jacobian, if applicable. In general this only makes sense for bijective transforms.

On this page

Ask DeepWiki