Instead of computing
directly, we store the Cholesky decomposition
computed using the QR decomposition.
Consider a matrix of column vectors
These columns correspond to
A covariance estimate is obtained by forming
where is the diagonal matrix formed from data weights ,
It may be verified that this is the same as
computing the elements of
But note that if you take the QR decomposition
Thus, we see that the QR decomposition of
is related to the Cholesky factor of
There is no reason to ever compute
requires twice the number of bits of precision as .
A quadratic form
can be computed using as follows:
This convention is used in the software (
precisely, the matrix tmpidx stores
where the rows of
The QR decomposition of tmpidx is
, which is stored as a parameter.
The subroutine for computing
lqr_eval.m. This routine
, and .
The mixture (13.1) is implemented by