stan-dev / math

The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic modeling, linear algebra, and equation solving.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
749 stars 187 forks source link

Update gaussian_dlm_obs_log to use LDLT #30

Open syclik opened 9 years ago

syclik commented 9 years ago

From @mbrubake on February 18, 2014 22:44

Currently still uses inverse_spd/log_determinant_spd which may be less than optimal for large systems.

Copied from original issue: stan-dev/stan#574

rayleigh commented 8 years ago

I was looking at this issue and looking through the code for inverse_spd and log_determinant_spd. Both use Eigen's LDLT and other Eigen functions. Is this still an issue? Or, are you looking to further optimize inverse_spd and log_determinant_spd?

bob-carpenter commented 8 years ago

@syclik or @mrbrubake: Could one of you verify this issue should still be outstanding.

And if it is, will whoever works on it please get rid of all those redundant // comment markers and unused includes and move the TODO items to an issue if they're still relevant.

mbrubake commented 8 years ago

This should still be outstanding but it's primarily a speed issue and (to a lesser extent) a robustness/stability thing. It would be an easy fix for someone, I suspect @rtrangucci or anyone else with a familiarity with LDLT could do it in an hour or less, as it looks like there are already tests for it.