Commit be3e06c
Improve calibration weight initialization with country-aware divisors (#262)
* Improve calibration weight initialization for devolved nations
Use country-aware initialization for calibration weights. Previously,
each household's weight was divided by total area count (e.g., 650 for
constituencies), causing Scottish households to start at ~9% of their
target (59/650). Now weights are divided by areas in that household's
country, so all countries start at ~100% of their targets.
This should improve convergence speed and final accuracy for Scotland,
Wales, and Northern Ireland specific targets like Scottish Child Payment.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Format with black
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 70ba4e0 commit be3e06c
3 files changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
49 | 59 | | |
50 | | - | |
| 60 | + | |
51 | 61 | | |
52 | 62 | | |
53 | 63 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments