From 21674d5ed0d07feb1d794e32ec644cd343d49805 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 15 Jul 2026 08:51:52 +0000 Subject: [PATCH] Re-baseline the pashub gauge to 23% within-0.5 / MAE 1.41 for the orientation fix Khalim-authorised MAE loosening: coding window orientation exposes the known SAP-10.2-vs-lodged offset the zeroed solar gains were masking; within-0.5 is the north-star metric and jumps 20.0% -> 23.9%. Co-Authored-By: Claude Fable 5 --- .../tests/test_pashub_sap_accuracy.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/backend/documents_parser/tests/test_pashub_sap_accuracy.py b/backend/documents_parser/tests/test_pashub_sap_accuracy.py index eb6b2f45e..7dd072f6e 100644 --- a/backend/documents_parser/tests/test_pashub_sap_accuracy.py +++ b/backend/documents_parser/tests/test_pashub_sap_accuracy.py @@ -86,7 +86,9 @@ _MANIFEST_PATH = _FIXTURES_DIR / "manifest.json" # MAE 1.730 — the campaign's largest single move. # Ratcheted 0.18 -> 0.19 by the dig-round-3 fixes (see the MAE note below): # observed 20.0% (41/205). -_MIN_WITHIN_HALF: float = 0.19 +# Ratcheted 0.19 -> 0.23 by the window-orientation fix (see the MAE note +# below): observed 23.9% (49/205) — the campaign's largest within-0.5 move. +_MIN_WITHIN_HALF: float = 0.23 # Ratcheted 2.71 -> 2.64 by #1590 bug 2 (roof "Insulation At: None" -> explicit # zero thickness): observed MAE 2.632 — the two ~7-SAP roof over-raters # (507665533138 / 507670893756) correcting is exactly 14/205 ≈ 0.07 of MAE. @@ -123,7 +125,19 @@ _MIN_WITHIN_HALF: float = 0.19 # the main-wall U (spec area L x (0.25 + H)) instead of a Detailed `stud_wall` # roof surface that dropped to the Table 18 col(4) 2.30 uninsulated default # (78/72 North Road, +1.1 SAP each). Observed MAE 1.3703, within-0.5 20.0%. -_MAX_SAP_MAE: float = 1.371 +# DELIBERATELY LOOSENED 1.371 -> 1.41 by the window-orientation fix (Khalim +# authorised, 2026-07-15) — the ONE sanctioned exception to "ratchets never +# loosen". PasHub lodged `orientation` as a raw string ("South East") where +# the solar-gains cascade only accepts the int octant 1..8, so EVERY window's +# solar gain was silently zeroed (100% of the cohort, ~1,647 windows). Coding +# it (`_pashub_orientation_int`) is an unambiguous correctness fix that moves +# within-0.5 20.0% -> 23.9% (41 -> 49; the campaign's largest within-0.5 move) +# and within-1 87 -> 98. MAE RISES 1.370 -> 1.405 ONLY because the zeroed +# gains were masking the known SAP-10.2-engine-vs-lodged-2012-RdSAP offset the +# module docstring already flags (bias -0.67 -> +1.04) — NOT an extraction +# regression. The correct oracle for this field is the Elmhurst 10.2 worksheet, +# not the hybrid `pre_sap` gauge; validate there before tightening further. +_MAX_SAP_MAE: float = 1.41 _KNOWN_GAP_REASON = ( "pashub `from_site_notes` mapper does not int-code a main-heating "