diff --git a/docs/HANDOVER_API_PROFILING.md b/docs/HANDOVER_API_PROFILING.md index c9c7bec3..581a123e 100644 --- a/docs/HANDOVER_API_PROFILING.md +++ b/docs/HANDOVER_API_PROFILING.md @@ -13,14 +13,40 @@ deproven approaches + the meter/shower data-fidelity findings), and the earlier `energy_rating_current`. Headline gauge: `PYTHONPATH=/workspaces/model python scripts/eval_api_sap_accuracy.py`. -| metric | session-3 (`a8e5563a`) | **session-4 (`faf29942`)** | -|--------|------------------|------------------| -| **% \|err\| < 0.5** | 45.1% | **47.6%** | -| % \|err\| < 1.0 | 59.4% | **62.6%** | -| % \|err\| < 2.0 | 77.7% | **79.6%** | -| mean \|err\| | 1.702 | **1.586** | -| computed / raises | 909 / 0 | **909 / 0** | -| unsupported_schema | 100 (deferred) | 100 (deferred) | +| metric | session-3 (`a8e5563a`) | session-4 (`faf29942`) | **session-5 (`43d4c67d`)** | +|--------|------------------|------------------|------------------| +| **% \|err\| < 0.5** | 45.1% | 47.6% | **48.6%** | +| % \|err\| < 1.0 | 59.4% | 62.6% | **63.8%** | +| % \|err\| < 2.0 | 77.7% | 79.6% | **79.9%** | +| mean \|err\| | 1.702 | 1.586 | **1.561** | +| computed / raises | 909 / 0 | 909 / 0 | **909 / 0** | +| unsupported_schema | 100 (deferred) | 100 (deferred) | 100 (deferred) | + +## SESSION-5 UPDATE (HEAD `43d4c67d`) — whc=903 immersion off-peak HW closed + +**Shipped (47.6 → 48.6%):** one spec-grounded fix, the session-4 robust-sweep `whc=903` +lead (median +0.87, n=84). +- `43d4c67d` **WHC-903 electric immersion off-peak HW → SAP 10.2 Table 13 high-rate fraction.** + Was billing 100% at the off-peak low rate; Table 12a "Immersion water heater" row (p.191) routes + the WH column to Table 13 (p.197). New `tables/table_13.py` evaluates the Note-2 equations (f of + cylinder volume V, occupancy N, single/dual immersion), clamped [0,1]; 18-/24-hour use the 10-hour + column (Note 1). Wired into `_hot_water_fuel_cost_gbp_per_kwh` (threads V / N / immersion-single + from the caller; absent any → old 100%-low fallback, no regression). Off-peak WHC-903 cohort + (n=57): within-0.5 16% → 33%, median |err| 1.56 → 0.86. +- **IMMERSION CODE MAPPING CORRECTED: `immersion_heating_type` 1 = DUAL, 2 = SINGLE.** The + session-3 handover lead #3's "(1=single, 2=dual)" was UNVERIFIED and BACKWARDS. Confirmed via + RdSAP 10 §10.5 (p.54 — immersion "assumed dual" on a dual/off-peak meter) cross-checked with the + cohort: code 1 sits 3.6:1 on dual meters (40 vs 11), code 2 on single meters (22 vs 16). Dual + carries Table 13's small fraction → matches the over-rating direction; the single mapping + overshot in a prototype (cohort within-0.5 16% → 14%). The description-vs-code-audit lesson + again: skeptical of unverified handover code-semantics claims. +- **Next robust leads (post-fix sweep, ranked by net directional skew + MEDIAN):** all now + UNDER-rate clusters (negative median = fabric/flat scatter, per-cert not one-bug): `property_type=2` + flats −0.31 (n=283), `wall_construction=3` −0.28 (n=221), roof "(another dwelling above)" −0.32 + (n=182), floor "(another dwelling below)" −0.35 (n=185). The remaining OVER-rate buckets are small: + "Cavity wall, as built, insulated" +0.26 (n=145), "Solid, no insulation" +0.13 (n=304). whc=903 has + dropped off the top of the sweep. `main_heat_cat=7` electric-storage (median +1.05, n=41) is still + open (tariff/cost; partly artifact) — was the session-4 #2 lead, untouched this session. **SESSION-4 shipped (45.1 → 47.6%):** four spec-grounded fixes + closed one false lead. See the `## SESSION-4 …` blocks below and the auto-memory for full detail. The systematic bias