Computes the Cholesky decomposition of a symmetric positive-definite matrix. Axes before the last two are batch axes.
Arguments
- x
(
arrayish)
One input, with at least 2 axes, the last two of equal size (a square matrix); any leading axes are batch axes. Can be any float data type. An R value materializes at its default data type.- lower
(
logical(1))
IfFALSE(default, matching base R'sbase::chol()), compute the upper triangular factorUsuch thatx = t(U) %*% U. IfTRUE, compute the lower triangular factorLsuch thatx = L %*% t(L).
Value
(arrayish)
Has the same shape and data type as the input.
The values in the triangle not specified by lower are implementation-defined.
Details
Differentiation is only implemented for a single matrix: the reverse rule
errors on a batched input (an input with more than 2 axes).
StableHLO
Lowers to hlo_cholesky(), specified under
cholesky.
References
Murray I (2016). “Differentiation of the Cholesky decomposition.” arXiv preprint arXiv:1602.07527.
Walter S (2012). Structured higher-order algorithmic differentiation in the forward and reverse mode with application in optimum experimental design. Ph.D. thesis, Mathematisch-Naturwissenschaftliche Fakult"at II.