Model/services/ml_training_data
Khalim Conn-Kowlessar 92727568a3 slice S-B10: price-table seam for cert-calibration parity validation
Separates the SAP-spec source of truth from the empirical cert-
calibration prices. cert_to_inputs() now accepts a `prices: PriceTable`
parameter defaulting to SAP_10_2_SPEC_PRICES (3.64 gas, 16.49 elec,
9.40 7h-low — verbatim from SAP 10.2 §12.2 / Table 12). Parity probe
passes the empirical cert_calibration_prices() factory from
domain.sap.tables.table_12_cert_calibration which carries the lower
prices that match the cert assessor software's actual output (3.48,
13.19, 5.50).

This split is documented in both table modules: cert calibration is
explicitly NOT spec-correct, it just matches observed cert behaviour
for parity testing.

100-cert parity probe with cert-calibration prices:
  MAE 6.66 → 4.99   (recovered from spec-price regression; also -0.41
                      from absolute baseline thanks to other S-B fixes)
  RMSE 10.29 → 7.13
  bias -4.66 → -1.03
  within ±1:  20% → 23%
  within ±3:  38% → 47%
  within ±5:  63% → 67%
  within ±10: 82% → 93%

Session-B progress overall (S-B2 baseline → here): MAE 8.41 → 4.99,
within ±1 doubled (10% → 23%).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 15:20:46 +00:00
..
src/ml_training_data slice S-B10: price-table seam for cert-calibration parity validation 2026-05-18 15:20:46 +00:00
tests slice 16i: MAE + RMSE in metrics; sample_weight_fn + low_sap_tail_weight 2026-05-17 14:48:00 +00:00
pyproject.toml slice 14g: remote_bulk_fetcher extracts ZIP entries via HTTP Range (no full download) 2026-05-16 19:16:52 +00:00