Skip to content

Chain numeric zero-inflated imputations#194

Closed
MaxGhenis wants to merge 1 commit into
mainfrom
codex/zero-inflated-chain-numeric-20260606
Closed

Chain numeric zero-inflated imputations#194
MaxGhenis wants to merge 1 commit into
mainfrom
codex/zero-inflated-chain-numeric-20260606

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

  • make ZeroInflatedImputer fit numeric targets in declared order with earlier numeric targets added as predictors for later numeric targets
  • predict with an augmented recipient frame so later targets receive prior imputed values
  • add a regression test proving the second numeric target gets and uses the first target prediction

Tests

  • uv run --extra dev python -m pytest -q tests/test_models/test_zero_inflated.py
  • uv run --extra dev python -m pytest -q tests/test_models/test_qrf.py -k sequential
  • uv run --extra dev python -m pytest -q tests/test_models/test_zero_inflated.py tests/test_models/test_qrf.py -k 'zero_inflated or sequential'
  • uv run --extra dev towncrier check --compare-with origin/main
  • uv run --extra dev ruff check microimpute/models/zero_inflated.py tests/test_models/test_zero_inflated.py
  • uv run --extra dev ruff format microimpute/models/zero_inflated.py tests/test_models/test_zero_inflated.py --check

Context

Microplex was calling the zero-inflated wrapper with income/tax blocks, but numeric targets still lost QRF's sequential target chaining because the wrapper fit each numeric base imputer with only [variable]. This PR keeps the regime-aware gates while preserving numeric chained-equation behavior.

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
microimpute-dashboard Ready Ready Preview, Comment Jun 6, 2026 6:25am

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #193, which includes the same numeric zero-inflated chaining fix plus an explicit sequential flag and stronger joint-correlation regression. I pushed a formatter-only fix to #193 and will monitor that CI path instead.

@MaxGhenis MaxGhenis closed this Jun 6, 2026
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