Skip to content

Use microimpute target filters for source imputations#1103

Merged
MaxGhenis merged 8 commits into
mainfrom
source-imputation-provenance
May 21, 2026
Merged

Use microimpute target filters for source imputations#1103
MaxGhenis merged 8 commits into
mainfrom
source-imputation-provenance

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • replace the temporary per-target QRF wrapper with microimpute target_filters in legacy CPS/SIPP surfaces and calibration source imputations
  • exclude ACS/SIPP allocated source values at the target level while preserving observed targets from the same donor row
  • add imputation provenance instructions so future changes update both legacy and calibration surfaces
  • require microimpute>=2.0.5; uv resolves microimpute 2.1.0

Tests

  • env -u UV_FROZEN uv run ruff check policyengine_us_data/utils/source_quality.py policyengine_us_data/datasets/sipp/sipp.py policyengine_us_data/calibration/source_impute.py policyengine_us_data/datasets/cps/cps.py tests/unit/test_source_quality.py tests/unit/datasets/test_cps_file_handles.py tests/unit/calibration/test_source_impute.py tests/unit/datasets/test_sipp_ssi_disability.py tests/unit/datasets/test_sipp_tip_columns.py
  • env -u UV_FROZEN uv run python -m pytest tests/unit/test_source_quality.py tests/unit/datasets/test_sipp_tip_columns.py tests/unit/datasets/test_sipp_ssi_disability.py tests/unit/calibration/test_source_impute.py tests/unit/datasets/test_cps_file_handles.py -q

@MaxGhenis MaxGhenis force-pushed the source-imputation-provenance branch from 88a0812 to 89908fd Compare May 21, 2026 18:44
@MaxGhenis MaxGhenis merged commit 7f8503b into main May 21, 2026
13 checks passed
@MaxGhenis MaxGhenis deleted the source-imputation-provenance branch May 21, 2026 22:05
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