From 2d6479536c8feb2f3f8d920aae054902ac05416f Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 29 Jun 2026 15:16:07 +0000 Subject: [PATCH] =?UTF-8?q?test(accuracy):=20ratchet=20SAP=20MAE=200.740?= =?UTF-8?q?=20->=200.726=20after=20HP=20PSR-extension=20=F0=9F=9F=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The heat-pump PSR-extension fix (SAP 10.2 Appendix N2) drops corpus MAE from 0.740 to 0.726 on the 1000-cert RdSAP-21.0.1 sample; within-0.5 holds at 74.1%. Tighten the ceiling and log the slice. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../epc_client/test_sap_accuracy_corpus.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/infrastructure/epc_client/test_sap_accuracy_corpus.py b/tests/infrastructure/epc_client/test_sap_accuracy_corpus.py index cc57d28d..c489e1ef 100644 --- a/tests/infrastructure/epc_client/test_sap_accuracy_corpus.py +++ b/tests/infrastructure/epc_client/test_sap_accuracy_corpus.py @@ -248,7 +248,16 @@ _MIN_WITHIN_HALF_SAP = 0.74 # an identical dwelling rates SAP 87 with "Connected to Dwelling = Yes" (credit # -£167) vs SAP 74 with "No" (credit £0). Enum decoded empirically: 0 = no PV, # 1 = not connected, 2 = connected (the gov-API does not expose it elsewhere). -_MAX_SAP_MAE = 0.740 +# Then 0.740 -> 0.726 via the heat-pump PSR-extension fix (SAP 10.2 Appendix N2, +# PDF p.101 footnotes 44/45): an air/ground/water source heat pump whose plant +# size ratio exceeds the PCDB record's largest PSR is no longer clamped to the +# top-of-table COP — its efficiency is reciprocal-interpolated toward 100% at +# twice the largest PSR (and 100% below the smallest PSR). Accredited Elmhurst +# worksheet for cert 100110101713 (golden fixture case 56, PCDB 100061, PSR +# 3.107 over largest 2.0): (206) 334.4% -> 139.66% = Elmhurst exact. Only two +# certs move (both oversized-PSR heat pumps): 100110101713 +18.32 -> -4.97 and +# 4510053280 -0.61; within-0.5 holds at 74.1%. +_MAX_SAP_MAE = 0.726 _MAX_CO2_MAE_TONNES = 0.09 # t CO2 / yr vs co2_emissions_current _MAX_PE_PER_M2_MAE = 3.5 # kWh / m2 / yr vs energy_consumption_current