lnccbrown / lnccbrown/HSSM

Use upstream location-aware non-centering for generated group-only Normal terms

Open
#1,268 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
124
Forks
24
Avg merge
19h 32m
Merged PRs (30d)
60

Description

## Summary

HSSM #1225 conservatively forces generated unmatched location-bearing group terms to
`noncentered=False`, because current Bambi discards a Normal `mu` under non-centering.

[Bambi #1003](https://github.com/bambinos/bambi/issues/1003) tracks the upstream change
needed to represent the mathematically equivalent form:

```text
group_coefficient = mu + sigma * offset
```

After that behavior is released and HSSM's minimum Bambi version includes it, HSSM can
remove the centered fallback for eligible generated outer-Normal unmatched terms.

## Scope

- Block this issue on Bambi #1003 and a released Bambi version.
- Relax the fallback only for generated outer-Normal priors whose complete location is
represented by Bambi's non-centered graph.
- Retain centered treatment for Gamma, Beta, and any other family Bambi cannot
non-center faithfully.
- Preserve exact/wildcard explicit-prior authority and model/component/per-prior
precedence.
- Treat `mu` as a location on the complete linear-predictor scale:
- identity: parameter-scale location;
- log: log-scale location;
- generalized logit: generalized-log-odds location.
- Do not make sampling-efficiency claims without separate benchmark evidence.

## Acceptance criteria

- Both `mu` and `sigma` are ancestors of the generated group coefficient and observed
likelihood under NC.
- No `*_mu` orphan exists.
- Centered and non-centered forms define the same prior model under identity, log, and
generalized logit.
- Matched common/group deviations remain zero-mean.
- Ambiguous repeated unmatched expressions remain rejected by HSSM safe generation.
- Gamma/Beta fallbacks remain centered.
- Model scalar, component dictionary, and per-prior precedence are covered.
- Structure/graph tests require no sampling.

## Related

- HSSM #1225 — conservative HSSM-owned correctness policy.
- Bambi #1003 — upstream prerequisite.

Contributor guide

Open the contributing guide

Research direction

First confirm that Bambi #1003 is released and included in HSSM's minimum Bambi version, then inspect the HSSM-owned fallback described in #1225 and the safe-generation path. Start with the existing structure/graph tests; done means the accepted ancestry, prior equivalence, precedence, rejection, and centered Gamma/Beta criteria all pass without sampling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.