From 3b2e6e348a6a848b5562e4b0286602364f8d104f Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 16 Jul 2026 15:41:35 +0000 Subject: [PATCH] =?UTF-8?q?Score=20heating-oil=20dwellings=20via=20SAP=20m?= =?UTF-8?q?ain-fuel=20code=2028=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #1632: LRHA WAVE 3 45→51 computed. Newly-unblocked oil configs land outside 0.5 (coverage growth per module convention) — within-0.5 floor re-baselined 0.46→0.41 at 41.2%/MAE 2.948. Co-Authored-By: Claude Fable 5 --- .../tests/test_pashub_sap_accuracy_lrha_wave3.py | 6 +++++- datatypes/epc/domain/mapper.py | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/documents_parser/tests/test_pashub_sap_accuracy_lrha_wave3.py b/backend/documents_parser/tests/test_pashub_sap_accuracy_lrha_wave3.py index 52c6d4d54..db5e9056b 100644 --- a/backend/documents_parser/tests/test_pashub_sap_accuracy_lrha_wave3.py +++ b/backend/documents_parser/tests/test_pashub_sap_accuracy_lrha_wave3.py @@ -48,10 +48,14 @@ _MANIFEST_PATH = _FIXTURES_DIR / "manifest.json" # '...2002-2021', cylinder size 'Exact cylinder volume' / 'Medium (131-170 # litres)', 'Heating oil' fuel, community-heating charging controls, 'MV - Heat # Recovery' — each its own field-by-field follow-up, not tuning. +# 2026-07-16 (#1622/#1632): 'Heating oil' main fuel → 28 unblocked the oil +# dwellings → **51 computed / 53 blocked** (within-0.5 41.2% = 21/51, MAE +# 2.948). The newly-computable oil configs land outside 0.5 per the +# coverage-growth convention above — floor re-baselined 0.46 → 0.41. # Treat the constants as a regression tripwire, NOT a cohort accuracy figure; # re-baseline (coverage growth is not loosening) as further mapper fixes unblock # fixtures. -_MIN_WITHIN_HALF: float = 0.46 +_MIN_WITHIN_HALF: float = 0.41 _MAX_SAP_MAE: float = 3.0 _KNOWN_GAP_REASON = ( diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index e7de214e5..0e8b45397 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -7817,6 +7817,10 @@ _PASHUB_MAIN_FUEL_TO_SAP10: Dict[str, int] = { # once the extractor captured the `Fuel:`-form label it had been dropping. "Dual fuel appliance (mineral and wood)": 10, "Electricity": 30, # the standard-electricity fuel code + # Oil boiler/heater fuel. 28 = epc_codes `main_fuel` "oil (not community)", + # the same code the Elmhurst map pins for the identical label; routes via + # `API_FUEL_TO_TABLE_32` → Table 32 code 4 (heating oil) for cost/CO2/PE. + "Heating oil": 28, } # PasHub surveyed secondary-heating `secondary_fuel` label → SAP 10.2 Table 32