Add annual mortality graph trajectories with isolated evaluation - #436
Draft
MaxGhenis wants to merge 2 commits into
Draft
Add annual mortality graph trajectories with isolated evaluation#436MaxGhenis wants to merge 2 commits into
MaxGhenis wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Sep 9, 2026
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 optional mortality graph currently adds only one future period. This adds
run_mortality_trajectoryto fit once and project through an explicit end year, retaining every person-period, original identity, survivor weight, and lineage. Each annual application uses the existing Dynamics mortality and ageing operations with person/year-keyed draws.Annual evaluation reads a typed snapshot of the actual materialized population. Its separately declared synthetic holdout cannot affect subsequent simulation or cache keys. Unsupported ages produce typed failure evidence and guarded descendants that preserve the latest valid population; reports distinguish application failure from the pinned executor's actual execution/cache receipts. Extending the horizon reuses earlier graph nodes and the fitted model.
This PR is stacked on draft #420. It retains the exact tested graph/Frame pin
3ff92b0aea14407d09479bff5623dc7d1a92d008; the related core contracts are under review in PolicyEngine/microcosm#873 and PolicyEngine/microcosm#893 and must be reconciled before landing. It does not change the M6 loop, mortality law, scientific gates, Q5 source-workflow pin, or historical evidence. One exact source exclusion plus import-reachability coverage keeps this optional module outside the historical birth-evidence identity.Validation:
Limits: this is synthetic engineering, not a DynaSim score or scientific/national projection certificate. Full-history snapshots have not been benchmarked at national scale. Household accounting, births, immigration, calendar-year mortality improvement, and the full M6 loop are outside this graph. Root creation, fitting, store corruption, and unexpected structural errors can still abort execution; retained diagnostic export covers application and evaluation failures.