Model/tests/domain/epc_prediction
Jun-te Kim e2915d8042 Prefer a MAIN-bearing prediction template so EPC-less dwellings predict 🟩
A predicted EPC is seeded by deep-copying one representative neighbour's
structure. _template chose the member whose floor area was closest to the
cohort median, ignoring building-part labels. When that member's only part
was lodged with a null identifier (mapped to OTHER), the prediction had no
MAIN part and the modelling_e2e handler rejected it as "not predictable" —
discarding an otherwise-rich same-type cohort.

Restrict the template to MAIN-bearing members (median still over the whole
cohort); fall back to closest-on-size only when none are MAIN-bearing, so an
all-unlabelled cohort is left for the handler's MAIN-part guard to reject
rather than silently relabelling real data.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 13:20:43 +00:00
..
__init__.py feat(epc-prediction): Comparable Properties selection ladder (ADR-0029) 2026-06-13 23:44:57 +00:00
test_comparable_properties.py refactor(epc-prediction): PR review — rename ComparableProperty, relocate PredictionTarget 2026-06-16 13:34:44 +00:00
test_component_accuracy_gate.py sap calculator variaince changes 2026-06-18 10:22:21 +00:00
test_epc_prediction.py Prefer a MAIN-bearing prediction template so EPC-less dwellings predict 🟩 2026-06-24 13:20:43 +00:00
test_prediction_comparison.py feat(epc-prediction): roof-insulation +/-1-bucket reporting 2026-06-15 14:04:18 +00:00
test_prediction_target.py refactor(epc-prediction): PR review — rename ComparableProperty, relocate PredictionTarget 2026-06-16 13:34:44 +00:00
test_validation.py Prefer a MAIN-bearing prediction template so EPC-less dwellings predict 🟩 2026-06-24 13:20:43 +00:00