BREAKING: use population metadata for time references - #368
Merged
Conversation
Contributor
|
uriahf
marked this pull request as ready for review
August 21, 2026 11:20
uriahf
marked this pull request as draft
August 21, 2026 11:32
uriahf
force-pushed
the
semantics/stage-3-time-reference-ownership
branch
from
August 21, 2026 12:14
bb2f78c to
cc4efac
Compare
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.
Status
Draft — intentional behavioral compatibility change. Do not merge as routine patch-level cleanup.
Goal
Use the internal evaluation metadata introduced in #369 to align time-dependent reference ownership with stable population identity.
Behavioral compatibility impact
This changes observable output for existing valid keyed-population inputs when distinct populations happen to have equal event risk at a horizon.
Current releases can collapse their prevalence/risk-dependent references to shared traces. After this change, those populations retain separate population-owned references. This can change reference trace names/counts, legend entries, color ownership, Plotly figure structure, and downstream snapshots that inspect those traces.
Function signatures and statistical formulas are unchanged, but this is still a potentially breaking behavioral change.
Implementation
The public time-dependent curve path now calls
_build_evaluation_metadata()from #369 and determines reference ownership from the distinctpopulationidentities in that metadata.Reference values are still computed using the same cutoff-0 horizon-specific event risk.
_replace_reference_data_times()accepts an explicit internalmultiple_populationsflag, with the previous risk-based inference retained as a fallback for callers without semantic context.Tests
Regression coverage verifies equal-risk population ownership for ROC, precision-recall, gains, lift, decision curves, and interventions avoided, plus public PR behavior for keyed populations and multiple models sharing one population.
Release decision required
Before merging, decide explicitly how this behavioral change should be versioned and communicated.
Scope
Two-file diff on top of #369. No public function-signature changes, no statistical formula changes, no
rtichoke_vizchanges, and no unrelated refactoring.