Skip to content

Use family relationship for PE family units#83

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/family-overfragmentation-20260529
May 29, 2026
Merged

Use family relationship for PE family units#83
MaxGhenis merged 1 commit into
mainfrom
codex/family-overfragmentation-20260529

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • use CPS family_relationship as a family-membership signal when assigning PolicyEngine family units
  • keep household-level SPM fallback and tax-unit construction unchanged
  • add a regression test covering an other-relative who should stay in the primary family and a non-family household member who should remain separate

Real-data structural probe

Existing calibrated small ASEC+ACS100k artifact, no recalibration:

  • families: 159,331 -> 109,234
  • families per household: 1.59331 -> 1.09234
  • family singleton share: 0.6567 -> 0.3795
  • family cross-household count: 0
  • tax units: unchanged at 130,980
  • SPM units: unchanged at 100,000
  • marital units: unchanged at 220,843
  • filing-status counts: unchanged

Probe artifact: /Users/maxghenis/CosilicoAI/microplex-us/artifacts/small_asec_acs100k_family_relationship_units_20260529/structural_probe.json

This directly addresses the family overfragmentation part of #81. The resulting family count is slightly below eCPS, so this should still be followed by the sound eCPS comparison on a rematerialized H5 before calling it replacement-ready.

Tests

  • uv run --python 3.13 --extra dev ruff check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py
  • uv run --python 3.13 --extra dev --extra policyengine pytest tests/pipelines/test_us.py -k "family_relationship_for_family_units or household_level_spm_fallback or derives_relationships_from_family_relationship or derives_relationships_from_one_based_family_relationship or prefers_richer_family_relationship"
  • uv run --python 3.13 --extra dev --extra policyengine pytest tests/pipelines/test_us.py

Refs #81

@MaxGhenis MaxGhenis merged commit ccc9939 into main May 29, 2026
4 checks passed
@MaxGhenis MaxGhenis deleted the codex/family-overfragmentation-20260529 branch May 29, 2026 16:07
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.

1 participant