Skip to content

Remove manual support sign controls from donor imputation#182

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/remove-support-sign-constants-20260602
Jun 2, 2026
Merged

Remove manual support sign controls from donor imputation#182
MaxGhenis merged 1 commit into
mainfrom
codex/remove-support-sign-constants-20260602

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • replace sign-specific support families with a signless SUPPORT_SENSITIVE family
  • remove DonorMatchStrategy.ZERO_INFLATED_POSITIVE and let rank matching auto-detect positive zero-inflated donor support
  • remove RegimeAwareDonorImputer nonnegative/sign/rare-class knobs and stop clamping support-sensitive predictions in Microplex-US
  • pin Microplex-US to Make zero-inflated regime detection presence-based microimpute#192 (27d23090) so ZeroInflatedImputer uses purely observed-support regime detection

Notes

  • This PR depends on Make zero-inflated regime detection presence-based microimpute#192. Once that is released, the git SHA pin can be replaced with a released version.
  • The legacy zi_qrf backend still has its own zero_inflated_vars/nonnegative_vars internals; the production regime_aware path no longer accepts or passes manual sign/clamp controls.

Tests

  • uv run --python 3.13 --extra dev ruff check src/microplex_us/variables.py src/microplex_us/pipelines/us.py src/microplex_us/pipelines/donor_imputers.py tests/test_variables.py tests/pipelines/test_us.py tests/pipelines/test_zi_qrf_backend.py tests/pipelines/test_regime_aware_donor_imputer.py tests/data_sources/test_scf_net_worth_components.py
  • uv run --python 3.13 --extra dev ruff format --check src/microplex_us/variables.py src/microplex_us/pipelines/us.py src/microplex_us/pipelines/donor_imputers.py tests/test_variables.py tests/pipelines/test_us.py tests/pipelines/test_zi_qrf_backend.py tests/pipelines/test_regime_aware_donor_imputer.py tests/data_sources/test_scf_net_worth_components.py
  • uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/test_variables.py tests/pipelines/test_regime_aware_donor_imputer.py tests/pipelines/test_zi_qrf_backend.py tests/data_sources/test_scf_net_worth_components.py -q
  • uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/pipelines/test_us.py -k "donor_imputer or support_sensitive or zero_inflated or signed_zero or clamp" -q
  • git diff --check

@MaxGhenis MaxGhenis merged commit 592f3ed into main Jun 2, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the codex/remove-support-sign-constants-20260602 branch June 2, 2026 18:13
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