Model/scripts
Khalim Conn-Kowlessar 98f71d2554 feat(diag): per-component cost decomposition for API SAP errors
Mirror of eval_api_sap_accuracy.py that decomposes each cert's SAP error
into per-component energy/cost deltas WITHOUT generating an Elmhurst
worksheet. Calibrates the consumer price from the certs we already get
right (gas £0.0809/kWh n=291, elec £0.2839/kWh n=326 over |SAP err|<0.4),
then for every cert compares our_component_kWh × price to the lodged
heating_cost_current / hot_water_cost_current / lighting_cost_current and
back-calculates a numeric energy target (lodged_cost / price).

Clusters errors by (component × direction). On the 905-cert sample this
reveals heat:high (we over-state heating energy → under-rate SAP) as the
dominant broken cluster: 332 certs, only 36.7% within 0.5. Output CSV at
<cache>/_cost_decomposition.csv.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 17:37:05 +00:00
..
analyse_api_sap_clusters.py scripts: promote the API SAP-accuracy toolkit from /tmp 2026-06-04 16:52:09 +00:00
decompose_api_cost_error.py feat(diag): per-component cost decomposition for API SAP errors 2026-06-06 17:37:05 +00:00
download_cotality_evidence.py new methods for downloading all core files for pashub URL. Download currently not being authorised 2026-03-24 08:47:59 +00:00
elmhurst_input_sheet.py fix(debug-tool): read the domain field names, not the schema ones 2026-06-05 19:48:02 +00:00
eval_api_sap_accuracy.py scripts: promote the API SAP-accuracy toolkit from /tmp 2026-06-04 16:52:09 +00:00
fetch_2026_epc_sample.py scripts: promote the API SAP-accuracy toolkit from /tmp 2026-06-04 16:52:09 +00:00
fetch_cohort2_api_jsons.py Move sap10_calculator tests to tests/domain/sap10_calculator/ for CI 2026-06-02 16:58:00 +00:00
historic_epc_demo.py added type hinting to uprn 2026-05-12 09:40:12 +00:00
init_db.py init db 2026-03-31 11:45:59 +00:00
rename_sharepoint_files.py rename files in sharepoint to desired structure 2026-05-20 16:26:07 +00:00
sero_address_list.csv add address list 2026-05-21 15:30:03 +00:00