Skip to content

Mask missing LA calibration targets#415

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/la-missing-target-masks-381
May 24, 2026
Merged

Mask missing LA calibration targets#415
MaxGhenis merged 1 commit into
mainfrom
codex/la-missing-target-masks-381

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • make the LA loss matrix use NaN for missing-source ONS income, tenure, and private-rent targets instead of national-share fallbacks
  • document the missing-source policy alongside the LA calibration sources
  • add fast regression coverage for missing-source masking and update council-tax test wording to match the shared policy

Closes #381.

Validation

  • uv run --python 3.13 --frozen ruff format --check policyengine_uk_data/datasets/local_areas/local_authorities/loss.py policyengine_uk_data/tests/test_la_loss_missing_sources.py policyengine_uk_data/tests/test_la_loss_council_tax.py
  • uv run --python 3.13 --frozen ruff check policyengine_uk_data/datasets/local_areas/local_authorities/loss.py policyengine_uk_data/tests/test_la_loss_missing_sources.py policyengine_uk_data/tests/test_la_loss_council_tax.py
  • uv run --python 3.13 --frozen pytest policyengine_uk_data/tests/test_la_loss_missing_sources.py policyengine_uk_data/tests/test_calibrate_save.py::test_calibrate_local_areas_masks_nan_local_targets policyengine_uk_data/tests/test_la_loss_council_tax.py -q

@MaxGhenis MaxGhenis merged commit 0cfcfb2 into main May 24, 2026
4 checks passed
@MaxGhenis MaxGhenis deleted the codex/la-missing-target-masks-381 branch May 24, 2026 17:34
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.

LA calibration: unify missing-source handling across loss.py blocks

1 participant