Replacing `llt` with `ldlt` decomposition in the Laplace approximation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.8k
- Forks
- 388
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 15
Description
Summary:
The Laplace approximation code at https://github.com/stan-dev/stan/blob/a3ee52eee6a294638445f2db5fed37214fae3142/src/stan/services/optimize/laplace_sample.hpp#L83 uses a Cholesky decomposition. In other parts of Stan's code base we use the ldlt decomposition from Eigen due to it's superior numerical stability (at the expense of being slower).
Description:
Replace the llt() with ldlt() for slower but more numerically stable code.
Current Version:
v2.31.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/stan/services/optimize/laplace_sample.hpp at line 83 and review other Stan code that uses Eigen's ldlt decomposition. Replace the Laplace approximation's llt() use with ldlt(), then verify that the code builds and the decomposition remains numerically stable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100