Skip to content

Use household-level fallback SPM units#80

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/household-spm-units-20260529
May 29, 2026
Merged

Use household-level fallback SPM units#80
MaxGhenis merged 1 commit into
mainfrom
codex/household-spm-units-20260529

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • assign one fallback SPM unit per household in the PolicyEngine entity-table builder
  • keep the existing family fallback split unchanged for now
  • add a regression test that an unrelated adult stays in a separate family while sharing the household SPM unit

Evidence

  • 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 'spm_unit or tax_unit_role_flags or role_conflicts or missing_role_flag_heads or young_head_hint_dependents or positive_income_adult_heads'\n- uv run --python 3.13 --extra dev --extra policyengine pytest tests/pipelines/test_us.py::TestUSMicroplexPipeline::test_build_policyengine_entity_tables_uses_household_level_spm_fallback\n- uv run --python 3.13 --extra dev --extra policyengine pytest tests/pipelines/test_us.py\n\n## Structural probe\nUsing the existing calibrated small dataset at /Users/maxghenis/CosilicoAI/microplex-us/artifacts/small_asec_acs100k_ssi_disability_model_fixed_sipp_status_20260524/gd_l0zero_e2000_latest_us_data/calibrated_data.parquet, the new builder writes /Users/maxghenis/CosilicoAI/microplex-us/artifacts/small_asec_acs100k_household_spm_20260529/structural_probe.json with:\n\n- households: 100,000\n- persons: 245,714\n- tax units: 130,980, unchanged from the household-coherent tax-unit build\n- SPM units: 100,000, down from the prior 159,331 family-mirrored fallback\n- families: 159,331, intentionally unchanged in this PR\n\nThis leaves the richer family-unit question for a separate change while removing the worst SPM overfragmentation from the PE export fallback.

@MaxGhenis MaxGhenis merged commit 4c581b8 into main May 29, 2026
4 checks passed
@MaxGhenis MaxGhenis deleted the codex/household-spm-units-20260529 branch May 29, 2026 15:28
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