pymc-devs / pymc-devs/pymc

Support symbolic eta parameter in LKJCholeskyCov.logp

Open
#8,403 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9.8k
Forks
2.3k
Avg merge
21h 39m
Merged PRs (30d)
5

Description

Description

In pymc/distributions/multivariate.py, _LKJCholeksyCovRV_logp currently enforces eta to be a scalar constant via get_underlying_scalar_constant_value, raising a NotImplementedError if a symbolic random variable (e.g., pm.HalfNormal) or tensor is provided.

However, LKJCorr.logp already supports dynamic/symbolic eta using _lkj_normalizing_constant, and LKJCholeskyCov contains a TODO to lift this requirement.

Lifting this scalar restriction on eta (while keeping matrix dimension n constant) brings LKJCholeskyCov to parity with LKJCorr and allows hierarchical priors on eta.

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 in pymc/distributions/multivariate.py with _LKJCholeksyCovRV_logp, then compare LKJCorr.logp and _lkj_normalizing_constant to understand the existing symbolic eta path. Keep the matrix dimension n constant; done means symbolic tensor and random-variable eta values are accepted without the current NotImplementedError and behave consistently with LKJCorr.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.