stan-dev / stan-dev/stan

Replacing `llt` with `ldlt` decomposition in the Laplace approximation

Open
#3,156 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.