LowerCholeskyTransform
TransformLowerCholeskyTransform()Bijection mapping an unconstrained matrix to a positive-diagonal Cholesky factor.
The standard reparameterisation used to learn covariance / scale
matrices: a free matrix is mapped to a lower
triangular matrix with strictly positive diagonal by zeroing the
strict upper triangle and applying softplus to the diagonal.
Composing with a base on produces a
pushforward over the cone of valid Cholesky factors.
event_dim = 2.
Notes
Forward (element-wise on a input ):
Inverse:
Log Jacobian determinant (summed over the matrix event dims):
Off-diagonal entries contribute unit Jacobian (identity map); only the softplus applied to the diagonal carries a non-trivial factor.
For correlation-matrix factors (unit diagonal) use
CorrCholeskyTransform instead.
Examples
>>> import lucid
>>> from lucid.distributions.transforms import LowerCholeskyTransform
>>> T = LowerCholeskyTransform()
>>> X = lucid.tensor([[0.0, 0.0], [0.5, 0.0]])
>>> L = T(X) # softplus on diagonal, raw on strict lowerMethods (1)
log_abs_det_jacobian
→Tensorlog_abs_det_jacobian(x: Tensor, y: Tensor)Sum of over the diagonal.
Off-diagonal entries contribute unit Jacobian; only the softplus applied to the diagonal contributes the non-trivial factor , computed via the stable identity .