mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-22 08:48:38 +00:00
The SAP rating is spec-floored at 1 ("if the result of the calculation is
less than 1, the rating is 1"). `sap_rating_integer` already clamps, but the
continuous `sap_score_continuous` did not — so a degenerate dwelling could
emit a physically impossible negative SAP. Apply the same max(1, …) floor to
the continuous value (the un-rounded part is for sensitivity near real
ratings, not for negative ratings).
Removes a -12.3 accuracy outlier on the committed corpus (cert 422000111926,
lodged at the floor of 1, was computing -11.3): within-0.5 70.2% -> 70.3%,
MAE 0.845 -> 0.833. Ratcheted the corpus MAE ceiling to 0.84. Unit-pinned in
test_calculator.
pyright not installed in this codespace (strict gate not run locally).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| climate | ||
| rdsap | ||
| validation | ||
| worksheet | ||
| __init__.py | ||
| test_bre_worked_examples.py | ||
| test_calculator.py | ||
| test_pcdb_etl.py | ||
| test_pcdb_lookup.py | ||
| test_pcdb_table_322_lookup.py | ||
| test_pcdb_table_329_lookup.py | ||
| test_pcdb_table_362_lookup.py | ||
| test_postcode_weather.py | ||
| test_real_cert_sap_accuracy.py | ||
| test_table_12.py | ||
| test_table_12a.py | ||
| test_table_13.py | ||
| test_table_32.py | ||