Fix calibration: AGI-conditional geography + relative loss#671
Open
Fix calibration: AGI-conditional geography + relative loss#671
Conversation
…rgets - Switch loss_type from "relative" to "capped_relative" in L0 optimizer. Caps relative error at ±10 (max loss 100 per target) to prevent extreme PUF-inflated targets from hijacking gradients. - Disable state_income_tax targets: ETL hardcodes $0 for WA and NH, but PolicyEngine computes non-zero tax (WA capital gains, NH interest/dividends). The $0 targets produced catastrophic loss crushing WA/NH weights to zero. - Enable district AGI, AGI bins, and JCT reform targets in config. - Result: 15,900 targets, median error 0.6% at epoch 500. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Route top-10% AGI households to congressional districts proportional to CD AGI targets instead of uniform random assignment. This prevents the optimizer from having to zero out extreme-income records in low-AGI districts, which was destroying population targets. Also reverts loss_type from "capped_relative" back to "relative" to restore AGI gradient signal. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"relative": Restores AGI gradient signal that"capped_relative"(commit 1c47b20) was clipping.Results (epoch 1000)
Test plan
🤖 Generated with Claude Code