diff --git a/backend/documents_parser/tests/test_pashub_sap_accuracy.py b/backend/documents_parser/tests/test_pashub_sap_accuracy.py index f451bae1b..09299d1cd 100644 --- a/backend/documents_parser/tests/test_pashub_sap_accuracy.py +++ b/backend/documents_parser/tests/test_pashub_sap_accuracy.py @@ -92,12 +92,17 @@ _MANIFEST_PATH = _FIXTURES_DIR / "manifest.json" # + bath counts never threaded into `sap_heating`; #1599 floor label "Ground # Floor" normalized to the calculator's "Ground floor" so the §5(12) suspended- # timber infiltration term fires; #1600 water-heating "None" coded to the RdSAP -# §10.7 WHC 999 default instead of inheriting the gas combi). Observed 50.2% -# (103/205) — the campaign's largest move. All three are silent-drop fixes the -# gov-API/Elmhurst paths already apply; verified against Khalim's ground truth -# (16 Stillwater 78.2 -> 75.7 vs 76; 58 Hackle 67.7 -> ~58 vs 59). #1601 (upper- -# floor +0.25 m) is HELD — it empirically over-corrects this cohort. -_MIN_WITHIN_HALF: float = 0.50 +# §10.7 WHC 999 default instead of inheriting the gas combi). All three are +# silent-drop fixes the gov-API/Elmhurst paths already apply; verified against +# Khalim's ground truth (16 Stillwater 78.2 -> 75.7 vs 76; 58 Hackle 67.7 -> +# ~58 vs 59). Ratcheted 0.50 -> 0.51 by #1602 (semi-exposed / exposed floor +# exposure flags -> RdSAP §5.14 U=0.7 / §5.13 Table 20) + #1603 (alternative- +# wall sub-areas + extension floor construction now threaded): observed 51.2% +# (105/205). #1601 (upper-floor +0.25 m) RESOLVED as keep-raw — adjudicated +# against verified truth it over-corrects every verified dwelling (raw beats +# +0.25 on all 7); pashub surveys internal dims and its upper-ground height +# gap is modal 0.00, so the joist void must not be added. +_MIN_WITHIN_HALF: float = 0.51 # 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. @@ -158,11 +163,13 @@ _MIN_WITHIN_HALF: float = 0.50 # shower + bath counts; #1599 floor label "Ground Floor" -> "Ground floor" so the # §5(12) suspended-timber infiltration fires; #1600 water-heating "None" -> RdSAP # §10.7 WHC 999 — see the within-0.5 note above), which SUPERSEDES the #1592 -# loosening: observed MAE 0.6517 on the merged tree (with the water-only DHW fix, -# 16 Bingley still +6.818). The three silent-drop fixes the gov-API/Elmhurst -# paths already apply; the electric-shower drop (100/205) was the dominant lever. -# #1601 (upper-floor +0.25 m) is HELD — it empirically over-corrects this cohort. -_MAX_SAP_MAE: float = 0.653 +# loosening: MAE 0.6517 on the merged tree (with the water-only DHW fix, 16 +# Bingley still +6.818). The three silent-drop fixes the gov-API/Elmhurst paths +# already apply; the electric-shower drop (100/205) was the dominant lever. +# Ratcheted 0.653 -> 0.625 by #1602 (floor exposure flags) + #1603 (alternative +# walls + extension floor construction): observed MAE 0.624. #1601 (upper-floor +# +0.25 m) RESOLVED as keep-raw — see the within-0.5 note above. +_MAX_SAP_MAE: float = 0.625 _KNOWN_GAP_REASON = ( "pashub `from_site_notes` mapper does not int-code a main-heating "