Certify UK Populace default dataset#427
Merged
Merged
Conversation
8bca058 to
7bf1c08
Compare
7bf1c08 to
f41f5e9
Compare
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
Certifies the published UK Populace release as the default UK dataset in
policyengine.py.Release:
populace-uk-2023-dd68c73-4aa4b14-20260619T023711ZDataset:
hf://policyengine/populace-uk-private/populace_uk_2023.h5@populace-uk-2023-dd68c73-4aa4b14-20260619T023711ZModel pin:
policyengine-uk==2.89.2Why promote
UK Populace materially outperforms the incumbent enhanced FRS surface under the matched-N sound comparison.
Target-fit diagnostics also look acceptable: mean absolute relative error is 1.49%, median is 0.96%, 97.99% of targets are within 10%, and the worst target miss is 23.1%, under the 25% release gate.
Salient targets
Shipped-weight relative error versus the registry target, compared with the incumbent enhanced FRS surface:
ons/lone_households_under_65ons/unrelated_adult_householdsons/couple_under_3_children_householdsons/lone_parent_dependent_children_householdsons/multi_family_householdsons/public_sector_employmentons/household_land_valueons/household_land_value/NORTH_WESTons/tenure_england_owned_with_mortgageons/tenure_england_social_rentslc/maintenance_loan_recipientsslc/adult_dependants_grant_recipientsobr/private_school_studentsLikely drivers
max_weight_ratio=50, reducing the max weight while improving loss.council_tax_less_benefit.Compatibility
The default UK dataset becomes
populace_uk_2023, but the bundled manifest still preserves the old logical dataset aliases:frs_2023_24enhanced_frs_2023_24Both resolve to the prior pinned
policyengine-uk-data-privateartifacts, so existing explicit dataset references keep working.Subnational geography
The old UK constituency matrix was built for the enhanced FRS household count (
650 x 53,508) and would not match Populace UK's535,080households. This PR therefore moves the Populace-facing UK constituency and local-authority paths to the longwise approach:RowFilterStrategyonconstituency_code_oaandla_code_oa.compute_uk_constituency_impactsandcompute_uk_local_authority_impactsgroup household outputs by those longwise columns instead of loading weight matrices.weight_matrix_pathandyeararguments are accepted for compatibility but ignored.This keeps Populace clean: no matrix generation, no matrix artifacts, and no default matrix dependency.
Verification
ruff format --check .ruff check .pytest tests/test_release_manifests.py tests/test_models.py tests/test_uk_regions.py tests/test_trace_tro.py tests/test_manifest_version_mismatch.py tests/test_dataset_sources.py tests/test_household_calculator_snapshot.py -qpytest tests/test_constituency_impact.py tests/test_local_authority_impact.py tests/test_uk_regions.py tests/test_scoping_strategy.py tests/test_extra_variables.py -qpytest tests/test_release_manifests.py tests/test_models.py tests/test_dataset_sources.py tests/test_manifest_version_mismatch.py tests/test_uk_regions.py tests/test_constituency_impact.py tests/test_local_authority_impact.py -q