Model/datatypes/epc/schema
Khalim Conn-Kowlessar 9f6f7608b9 slice 15b: +18 features — heating type code, hot water, windows, flat, supply
Heating: primary_sap_main_heating_code (the SAP10 heating-system enum was the
single biggest missing input), primary_emitter_temperature,
primary_main_heating_fraction.

Hot water: immersion_heating_type, shower_outlet_count.

Windows: window_pct_living, window_pct_external, window_pct_permanent_shutters
(area-weighted shares parallel to existing window aggregates).

Dwelling: conservatory_type, has_heated_separate_conservatory.

Flat-only block (sap_flat_details): flat_level, flat_top_storey,
flat_storey_count, flat_location, flat_heat_loss_corridor (int sentinels
like '20+' coerce to None for the categorical features).

Energy supply: meter_type, pv_connection, wind_turbines_terrain_type.

Also plumbs `air_tightness` EnergyElement, `sap_flat_details` and
`has_heated_separate_conservatory` through the 21.0.1 mapper path (they were
silently None before).

Results at N=25,000 2026 RdSAP certs:
  sap_score          MAPE=0.044  sMAPE=0.038  R^2=0.884  (+0.045 R^2 vs 15a)
  co2_emissions      sMAPE=0.108  R^2=0.925
  peui_raw           MAPE=0.092  sMAPE=0.088  R^2=0.849
  peui_ucl           MAPE=0.081  sMAPE=0.078  R^2=0.860
  space_heating_kwh  MAPE=0.111  sMAPE=0.108  R^2=0.945
  hot_water_kwh      MAPE=0.081  sMAPE=0.079  R^2=0.772

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 00:08:11 +00:00
..
tests slice 14i: pin real RdSAP cert as fixture + RED regression test 2026-05-16 20:23:29 +00:00
__init__.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
common.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
helpers.py slice 10.5: PhotovoltaicArray on SAP10 schema + EpcPropertyData 2026-05-16 16:00:25 +00:00
rdsap_schema_17_0.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
rdsap_schema_17_1.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
rdsap_schema_18_0.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
rdsap_schema_19_0.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
rdsap_schema_20_0_0.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
rdsap_schema_21_0_0.py slice 14j: Optional sweep across schema 21.0.1 + mapper guards 2026-05-16 20:35:28 +00:00
rdsap_schema_21_0_1.py slice 15b: +18 features — heating type code, hot water, windows, flat, supply 2026-05-17 00:08:11 +00:00