RdSAP 10 item 2-3(h) "another dwelling above" is U=0 (spec p.45: "There is no heat loss through the roof of a building part that has the same dwelling above or another dwelling above"). gov-API `roof_construction = 3` is that code, but the mapper labelled it "Pitched (slates/tiles), no access to loft" (which is code 5), so the per-part party override at heat_transmission.py:1172 never matched and the part fell through to the dwelling_type-label-only has_exposed_roof heuristic. 190 of the 200 corpus code-3 parts sit at index 0 and are already suppressed by `_cert_lodges_exposed_roof` off the roof_insulation_location == "ND" signal. The unmitigated set is the 10 parts at index > 0, where extensions default to exposed and were billed a phantom pitched roof. Also removes a latent PV defect: the bogus "Pitched" prefix satisfied `is_pitched` and divided PV array area by cos(35 deg), inflating kWp. Shipped with the stairwell fix so the corpus pin moves once: within-0.5 78.8% -> 79.6%, SAP MAE 0.626 -> 0.611, PE MAE 2.9 -> 2.7. The roof change alone trades 4 certs out of the +-0.5 band for 2 in (one moving 4.4 SAP closer). Those 4 were investigated and are NOT a masked bug: the corpus error distribution is symmetric (mean +0.076, median +0.03, sigma 1.606; 112 certs above +0.5 vs 102 below), ground-floor flats show 7 positive / 8 negative with no excess over the null, and closing them needs HLC changes of 2.3-5.6% — below the ~8.8% noise floor of the RHI anchor, calibrated on the 76 certs whose SAP is exact (space-heating ratio 1.062 +/- 0.088). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .claude/skills | ||
| .devcontainer | ||
| .github/workflows | ||
| .idea | ||
| .vscode | ||
| applications | ||
| asset_list | ||
| backend | ||
| backlog | ||
| datatypes | ||
| deployment/terraform | ||
| docs | ||
| domain | ||
| epr_data_exports | ||
| etl | ||
| harness | ||
| infrastructure | ||
| model_data/requirements | ||
| orchestration | ||
| recommendations | ||
| repositories | ||
| sap worksheets | ||
| scripts | ||
| sfr/principal_pitch | ||
| survey_report | ||
| tests | ||
| utilities | ||
| utils | ||
| .coveragerc | ||
| .dockerignore | ||
| .gitignore | ||
| __init__.py | ||
| ara_backend_design.md | ||
| BaseUtility.py | ||
| CLAUDE.md | ||
| conftest.py | ||
| CONTEXT.md | ||
| devcontainer.sh | ||
| Dockerfile.test | ||
| Dockerfile.test.dockerignore | ||
| Makefile | ||
| MEMORY.md | ||
| modelling_audit.md | ||
| next_claude_prompt.txt | ||
| P960-0001-001431-2.pdf | ||
| package-lock.json | ||
| package.json | ||
| playground.py.local-backup | ||
| pyproject.toml | ||
| pyrightconfig.json | ||
| pytest.ini | ||
| README.md | ||
| run_lambda_local.sh | ||
| serverless.yml | ||
| Summary_001431-3.pdf | ||
| test.requirements.txt | ||
| tox.ini | ||
| UBIQUITOUS_LANGUAGE.md | ||
Model Repository
This repository contains the code pertaining to the development of the data science and machine learning products being utilised by Hestia.
The different folders in this repository relate to services that can be used independently, or can be imported and used as part of a larger application
Getting Started
Prerequisites
Dev Container Setup
This repo uses a Docker Compose-based dev container. The model-backend service joins a shared-dev Docker network so it can communicate with other local services (e.g. a frontend container) running on your machine.
VS Code users: The initializeCommand in devcontainer.json creates the shared-dev network automatically before the container starts. No manual step required — just open the repo and select Reopen in Container.
Non-VS Code / CI workflows: Run the following once before starting the container:
make dev-setup
This is idempotent and safe to re-run if the network already exists.
Folders
backend/
This folder contains the code for the fastapi backend service, which provides an interface to much of the functionality in this repository, for the frontend
model_data/
This folder contains related to the reading and preparation of assessment model data, including pulling out epc attributes
Testing
All tests can be run, against the configuration in pytest.ini running
pytest
This will run the complete panel of tests and report on coverage in the locations specified by the pytest.ini file.
To run tests in a specific service, e.g. inside of model_data, simply run
pytest --cov-config=model_data/.coveragerc --cov=model_data
This will produce the test results and coverage reports