Skip to content

Fix calibration multi-population input contract - #291

Merged
uriahf merged 13 commits into
mainfrom
agent/fix-calibration-multipopulation
Aug 11, 2026
Merged

Fix calibration multi-population input contract#291
uriahf merged 13 commits into
mainfrom
agent/fix-calibration-multipopulation

Conversation

@uriahf

@uriahf uriahf commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Closes #290.

What changed

  • fixes _make_deciles_dat_binary() so matching probs / reals dictionary keys are paired population-by-population
  • allows different populations to have different sample sizes while still requiring lengths to match within each population
  • preserves the existing single-population and one-concatenated-model behavior
  • adds focused regression coverage for unequal-size populations in regular and time-dependent calibration
  • refines the README with an explicit Train/Test calibration example where the populations have different sizes

Root cause

The binned calibration helper treated every probability vector as though it had to span the sum of all population sizes. That conflicted with the natural keyed representation already used elsewhere in calibration:

probs["Train"] <-> reals["Train"]
probs["Test"]  <-> reals["Test"]

Scope

This PR intentionally makes only the changes needed for #290. It does not introduce a new calibration module or normalization layer, and it does not address the separate time-heuristic or integer-horizon issues.

Validation

The regression tests cover unequal-size populations for both ordinary calibration rendering modes and for create_calibration_curve_times(). GitHub Actions runs the repository test and documentation workflows.

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-11 15:39 UTC

@uriahf
uriahf marked this pull request as ready for review August 11, 2026 15:38
@uriahf
uriahf merged commit 62d2f56 into main Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix calibration dict/dict multi-population contract

1 participant