feat: omega layered-prior builder in qsp_inference.targets - #83
Merged
Conversation
The prior half of the maple target-data contract, migrated out of pdac workflows/omega_prior.py. build_omega_center walks the four population-spread layers (global default -> role -> explicit -> data-shrunk-by-n, MBMA), generic over the role map / global default / class-prior tau injected by a project. Ships OmegaEntry, shrink_toward_prior, load_omega_overrides (role-validated), load_population_n (biological n per parameter from submodel targets), and write_provenance. Sibling of the observed-data half (anchors); both now live in targets/. pdac keeps its role values / CSV / dirs and wraps these. 9 tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The prior half of the maple target-data contract, migrated out of pdac
workflows/omega_prior.py(sibling of the observed-data anchor half).build_omega_centerwalks the four population-spread layers — global default → role → explicit → data-shrunk-by-n (MBMA shrinkage: a sample SD from n donors pulls omega with precision 2(n-1) against the class prior) — generic over the role map / global default / class-prior tau a project injects.Ships
OmegaEntry,shrink_toward_prior,load_omega_overrides(role-validated),load_population_n(biological n per parameter from submodel targets, moved verbatim to preserve behavior),write_provenance. 9 tests.pdac keeps its role values / CSV path / target dirs and wraps these (next PR reduces
omega_prior.pyto that thin wrapper).