math icon indicating copy to clipboard operation
math copied to clipboard

Update `multi_normal` to call `multi_normal_cholesky` after the cholesky

Open spinkney opened this issue 4 years ago • 1 comments

The multi_normal lpdf relies on autodiff but the multi_normal_cholesky has derivatives. It makes sense to just call multi_normal_cholesky once the Cholesky decomposition is taken of the covariance matrix in the multi_normal_lpdf to take advantage of those derivatives.

This should be a simple fix.

spinkney avatar Jul 20 '21 15:07 spinkney

The precision parameterization should have derivatives as well. A few ad hoc tests of mine show that the cholesky version is faster than precision, do others see the same?

spinkney avatar Aug 13 '21 20:08 spinkney