Model/tests/scripts
Jun-te Kim 009394bb19 neighbour_divergence: key cohorts on main-heating fuel
The neighbour SAP-divergence cohort was (postcode, property_type, built_form),
which mixed electric- and gas-heated dwellings. Electricity scores materially
lower in SAP than mains gas for identical fabric, so a mixed-fuel postcode
produced cross-fuel false outliers — an electric dwelling flagged only for being
electric among gas neighbours.

Add the main-heating fuel class to the cohort key (electricity variants — 29/30
+ off-peak 31-40 — collapse to one class; every other code is its own bucket).
Now every flagged divergence is a same-fuel comparison worth investigating. On
portfolio 814 this refined 20 raw divergences to 17 same-fuel ones while keeping
the genuine within-fuel outliers (e.g. the all-electric WC2B 4AW flats at SAP
26/38 vs a cohort median of 67).

Reaches the fuel via epc_main_heating_detail through the indexed property_id —
still never touches the recommendation table. Surfaced by the portfolio-814
recommendation audit (Work item B, #1388).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 14:24:31 +00:00
..
__init__.py Rename files in subfolders too 2026-06-12 16:04:19 +00:00
test_audit_anomalies.py Add find-weird-recommendations skill + its two detectors 2026-07-01 11:06:03 +00:00
test_neighbour_divergence.py neighbour_divergence: key cohorts on main-heating fuel 2026-07-01 14:24:31 +00:00
test_null_predicted_lodged_performance.py Backfill the phantom Lodged Performance on predicted Properties to NULL 🟩 2026-06-30 22:17:57 +00:00
test_reclassify_flat_roof_thickness.py Re-classify flat-roof overrides with a known depth onto their thickness member 🟩 2026-07-01 10:19:09 +00:00
test_reclassify_heating_overrides.py One-time script to re-classify stale heating overrides 2026-06-30 20:30:59 +00:00
test_reclassify_mixed_glazing.py Re-classify aggregate-mix glazing overrides flattened to Double onto MIXED 🟩 2026-07-01 11:09:42 +00:00
test_reclassify_party_ceiling_roofs.py Re-classify party-ceiling roof overrides mis-read as external roofs 🟩 2026-07-01 09:46:01 +00:00
test_rename_sharepoint_files.py fix terraform error and pass handler bool for dry runs 2026-06-15 14:06:54 +00:00