Sequential share-of-remainder imputation for SS sub-components#605
Open
Sequential share-of-remainder imputation for SS sub-components#605
Conversation
Instead of predicting all 4 SS sub-components in the main QRF batch and then normalizing them to sum to total social_security, predict shares of the remaining total sequentially: 1. retirement_share = retirement / total → retirement = share × total 2. disability_share = disability / (total − retirement) 3. survivors_share = survivors / (total − retirement − disability) 4. dependents = remainder Each QRF predicts a fraction in [0, 1], so sub-components are guaranteed non-negative and sum to the total by construction — no post-hoc normalization or fallback shares needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
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.
Summary
component / remaining_total(a fraction in [0,1]) via QRF, then multiplies by the remaining dollar amountsocial_securityby construction — no normalization or fallback shares neededHow it works
retirement / total_ss→retirement = share × totalsurvivors / (total − retirement)→survivors = share × remainingdisability / (total − retirement − survivors)→ same patternEach QRF conditions on demographics, income, and the running remaining total.
Supersedes #603 (normalize-then-rescale approach).
Test plan
test_subcomponents_sum_to_total— exact sum constrainttest_zero_ss_zeroes_all_subcomponents— no leakagetest_all_components_non_negative— by constructiontest_retirement_dominates— >50% share🤖 Generated with Claude Code