def logsqrtdet(self):
# Sigma = L^T L -- but be careful: only the lower triangle and
# diagonal of L are actually initialized; the upper triangle is
# garbage.
L, _lower = self._cholesky
# det Sigma = det L^T L = det L^T det L = (det L)^2. Since L is
# triangular, its determinant is the product of its diagonal. To
# compute log sqrt(det Sigma) = log det L, we sum the logs of its
# diagonal.
return np.sum(np.log(np.diag(L)))
评论列表
文章目录