Repository navigation
Conversation
OasisLMF#2145 makes 'samples' the default disaggregation. A location's buildings are then multiplexed into the sample dimension and each draws its own random numbers, where 'items' with the default hash gave every building of a location the SAME group_id -- so they were perfectly correlated. These two tests are the only PiWindPostcode cases with NumberOfBuildings > 1, which is why only they move. The new results are the more correct simulation, not a different one. Checked by running test_4 three ways on the same exposure: main, default hash selt 3135 rows EPT median |diff| vs samples 4.12%, p95 36.9% main + building_id in hash selt 3814 rows EPT median |diff| vs samples 0.26%, p95 3.0% branch, samples selt 3801 rows Adding building_id to the damage hash on main reproduces the branch's result to Monte Carlo noise, which is what identifies the correlation assumption as the cause rather than a change in the losses themselves. Total loss is conserved: test_4 +0.012%, test_5 -0.092%; it is the spread that changes. test_5 shows the same effect more weakly because only 2 of its 6 locations have more than one building, so most of it is unchanged by construction. test_1/2/3 were left alone: regenerating them produced only last-bit float32 differences (2868654.000000 -> 2868654.250000), which are below the check tolerance and unrelated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
OasisLMF#2145 fixes summary-info reporting a packed location's TIV as one building's share rather than the location total: number_of_buildings was dropped when the summary map is read back and narrowed to MAP_SUMMARY_DTYPES, so the multiplication that restores the location total had nothing to work from. Only the reported exposure moves -- no loss file changes, which is why just the four summary-info files are touched. test_4 82,896.27 -> 250,000.00 test_5 28,429,687.5 -> 32,781,250.0 Both land at 92.59% of their source exposure total, the same keys-coverage ratio; the old test_4 figure was 31% of its exposure. Co-Authored-By: Claude Opus 5 (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.
Expected-results update for OasisLMF#2145, which makes
samplesthe default disaggregation.Why these two tests move
Under
samplesa location's buildings are multiplexed into the sample dimension and each draws its own random numbers. Underitemswith the default hash (PortNumber, AccNumber, LocNumber) every building of a location shared onegroup_id— so they were perfectly correlated.test_4andtest_5are the only PiWindPostcode cases withNumberOfBuildings > 1.Evidence this is the more correct simulation, not a different one
test_4run three ways on the same exposure:building_idin the damage hashsamplesAdding
building_idto the hash on main reproduces the branch's result to Monte Carlo noise. That identifies the correlation assumption as the cause, rather than any change to the losses.Total loss is conserved —
test_4+0.012%,test_5−0.092%. It is the spread that changes.test_5shows the effect more weakly: only 2 of its 6 locations have more than one building, so most of it is unchanged by construction.Merge ordering
This PR and OasisLMF#2145 must land together. Each one makes
run-model-testsfail against theother repo's current
main, so merging either alone turns that job red on every other open PRthere until the second follows. Verified green as a pair on all five Python versions via
workflow_dispatch(run): 22 passed, 5 skipped on 3.10 through 3.14.Second commit: summary-info TIV
OasisLMF#2145 also fixes summary-info reporting a packed location's TIV as one building's share
rather than the location total —
number_of_buildingswas dropped when the summary map is readback and narrowed to
MAP_SUMMARY_DTYPES, leaving the multiplication that restores the locationtotal with nothing to work from.
Only the reported exposure moves, which is why that commit touches just the four
summary-infofiles and no loss output:
test_4test_5Both land at 92.59% of their source exposure total — the same keys-coverage ratio — against the
old
test_4figure being 31% of its exposure.Not included
test_1/2/3were regenerated and reverted — they produced only last-bit float32 differences (2868654.000000→2868654.250000), below the check tolerance and unrelated to this change.🤖 Generated with Claude Code