Model/tests
Khalim Conn-Kowlessar fa11df56c2 fix(epc-prediction): dedupe re-lodgements + leak-free leave-one-out (ADR-0029)
The register lists every historical lodgement, so a postcode cohort
contains the same physical address many times (LS61AA: 15 certs / 11
addresses; NG71AA: 15 / 9 — "FLAT 3" appears 3x in each). Two
consequences:

  - Production: a re-lodged neighbour was counting up to 3x towards the
    cohort mode. select_comparables now dedupes candidates to the latest
    cert per address (one comparable per real neighbour) — Comparable
    gains address + registration_date (the register metadata its docstring
    already anticipated, read straight off the cached payload).

  - Validation: leave-one-out leaked — predicting a flat from a near-
    identical re-lodgement of itself. The harness now holds out a whole
    address (excludes every sibling cert) and evaluates on the latest cert
    per address (the best ground truth).

Removing the leak gives the honest numbers (19 distinct addresses):
  wall_construction      93.1% -> 89.5%
  construction_age_band  65.5% -> 52.6%
  roof_construction      79.3% -> 68.4%
  floor_area mean|.|     37.9  -> 52.6 m2
The earlier figures were inflated by self-leakage; these are the real
accuracy to beat.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 00:40:23 +00:00
..
applications put db engine construction inside handler to avoid import errors in test 2026-06-09 15:18:42 +00:00
datatypes fix(mapper): map cylinder "No Insulation" to insulation_type=None 2026-06-08 09:52:06 +00:00
domain fix(epc-prediction): dedupe re-lodgements + leak-free leave-one-out (ADR-0029) 2026-06-14 00:40:23 +00:00
harness feat(modelling): wire secondary-heating-removal into the pipeline (ADR-0028) 2026-06-11 16:04:07 +00:00
infrastructure python upgraded due to enum 2026-06-12 15:47:28 +00:00
magic_plan Migrate all MagicPlan tests to single new-format fixture 🟪 2026-06-05 12:59:56 +00:00
orchestration Merge branch 'main' of https://github.com/Hestia-Homes/Model into feature/junte+khalim 2026-06-12 13:45:30 +00:00
repositories Merge branch 'main' of https://github.com/Hestia-Homes/Model into feature/junte+khalim 2026-06-12 13:45:30 +00:00
utilities added floats helper 2026-06-12 14:28:41 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
conftest.py Audit generator populates XLSX, uploads to S3, and records UploadedFile row 🟪 2026-06-09 12:05:55 +00:00
test_lambda_packaging.py more tests to ensure we don't deploy something that is brokern 2026-06-02 15:03:20 +00:00