Triangular Linear Bijector¤
distreqx.bijectors.TriangularLinear(distreqx.bijectors.AbstractLinearBijector)
¤
A linear bijector whose weight matrix is triangular.
The bijector is defined as \(f(x) = Ax\) where \(A\) is a \(D \times D\) triangular matrix.
The Jacobian determinant can be computed in \(O(D)\) as follows:
\[\log|\det J(x)| = \log|\det A| = \sum \log|\text{diag}(A)|\]
The inverse is computed in \(O(D^2)\) by solving the triangular system \(Ax = y\).
Note
The bijector is invertible if and only if all diagonal elements of \(A\) are non-zero. It is the responsibility of the user to make sure that this is the case; the class will make no attempt to verify that the bijector is invertible.
__init__(matrix: Array, is_lower: bool = True)
¤
Initializes a TriangularLinear bijector.
Arguments:
matrix: a square matrix whose triangular part definesA. Can also be a batch of matrices. WhetherAis the lower or upper triangular part ofmatrixis determined byis_lower.is_lower: if True,Ais set to the lower triangular part ofmatrix. If False,Ais set to the upper triangular part ofmatrix.