Skip to content

Handle overlapping regime-aware donor predictors#242

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/regime-aware-overlap-predictors-20260606
Jun 6, 2026
Merged

Handle overlapping regime-aware donor predictors#242
MaxGhenis merged 1 commit into
mainfrom
codex/regime-aware-overlap-predictors-20260606

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • remove target variables from the base predictor list before fitting the chained regime-aware donor imputer
  • preserve sequential chaining so earlier targets are still used as predictors for later targets
  • add a regression test for the production failure mode where a target also appears in the original condition vars

Failure fixed

The post-#241 release rebuild failed in the large PUF chained income block because duplicate column names caused pandas to return a DataFrame for a target, and MicroImpute then crashed in target-type detection on .unique().

Tests

  • env -u UV_FROZEN uv run --python 3.13 --extra dev --extra policyengine ruff format src/microplex_us/pipelines/donor_imputers.py tests/pipelines/test_regime_aware_donor_imputer.py
  • env -u UV_FROZEN uv run --python 3.13 --extra dev --extra policyengine ruff check src/microplex_us/pipelines/donor_imputers.py tests/pipelines/test_regime_aware_donor_imputer.py
  • env -u UV_FROZEN uv run --python 3.13 --extra dev --extra policyengine pytest -q tests/pipelines/test_regime_aware_donor_imputer.py
  • env -u UV_FROZEN uv run --python 3.13 --extra dev --extra policyengine pytest -q tests/test_pe_source_impute_specs.py tests/test_pe_source_impute_engine.py tests/pipelines/test_donor_imputer_negative_preservation.py tests/data_sources/test_scf_net_worth_components.py -k "imputer or regime_aware or columnwise or pe_source"

@MaxGhenis MaxGhenis merged commit 3fc25d8 into main Jun 6, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the codex/regime-aware-overlap-predictors-20260606 branch June 6, 2026 07:38
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