Map an unconstrained matrix to a positive-diagonal lower-triangular 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 exponentiating the diagonal, as the reference
framework does. Composing with a base on
produces a pushforward over the cone of valid Cholesky factors.
event_dim = 2.
The strict upper triangle of the input is discarded, so the map is onto
the lower-Cholesky cone but not one-to-one on ;
it is registered with transform_to and not biject_to.
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 exponential 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) # exp on diagonal, raw on strict lowerUsed by 2
Instance methods
1Sum of the diagonal of x: .
Off-diagonal entries contribute unit Jacobian; the exponential on the diagonal contributes .
Parameters
Returns
TensorPer-sample log-Jacobian (reduces the last two matrix axes).