feat: complete ML pipeline, FastAPI service, small model, tests, image

- finish the global HistGB bundle, scenario forecasts and 28-day ablation
- export sensors/series/forecasts/metrics/context plus baked weather frames
- add FastAPI health/meta/predict/simulate and background /train jobs
- add the p75 busy classifier, retraining from CSV, and hot-swap persistence
- add pytest coverage, multi-stage non-root Dockerfile, README and model card

Holdout: weather 7d MAE 3.32 / WAPE 27.5% / R2 0.777 vs seasonal naive
MAE 4.23 / WAPE 35.0% / R2 0.656 (5,350 eval rows).
This commit is contained in:
Noel Sabia committed 2026-11-14 05:01:16 +01:00
1 parent 68402803b2
commit 939a8db482
43 files changed
+4090 -105

No files matched your search

+98
View File
@@ -0,0 +1,98 @@
{
"raw_rows": 192464,
"density_rows": 96232,
"battery_rows": 96232,
"device_ids": 12,
"sensor_names": 11,
"usable_sensors": 8,
"sensor_ids": [
"density-01",
"hn-goetzentuem-01",
"hn-hagenbuchersee-01",
"hn-hagenbuchersee-02",
"hn-marahaus-01",
"hn-neckarufer-01",
"hn-soleo-01",
"hn-stadtgalerie-01"
],
"excluded_sensors": {
"maker-fair": {
"rows": 73,
"reason": "test installation in Hannover, 73 readings, outside the inner city"
},
"niklas-01": {
"rows": 8,
"reason": "8 readings, outside the inner-city cluster"
},
"hn-bollwerksturm-01": {
"rows": 5,
"reason": "5 readings, insufficient coverage"
}
},
"density_01_devices": {
"863f75b0": {
"rows": 8075,
"first": "2025-10-16T21:17:59Z",
"last": "2026-03-12T18:28:06Z"
},
"f8c19730": {
"rows": 17585,
"first": "2026-04-16T23:25:31Z",
"last": "2026-11-07T23:48:49Z"
}
},
"density_01_rows_multi_sensor": 12670,
"time_range": {
"from": "2025-10-16T21:17:59Z",
"to": "2026-11-07T23:51:57Z"
},
"multi_sensor_from": "2026-06-12T00:13:21Z",
"cadence_median_min": 15.31,
"dropped_out_of_range": 0,
"duplicate_keys_dropped": 0,
"checks": [
{
"name": "raw_rows",
"expected": 192464,
"actual": 192464,
"ok": true
},
{
"name": "density_rows",
"expected": 96232,
"actual": 96232,
"ok": true
},
{
"name": "battery_rows",
"expected": 96232,
"actual": 96232,
"ok": true
},
{
"name": "device_ids",
"expected": 12,
"actual": 12,
"ok": true
},
{
"name": "sensor_names",
"expected": 11,
"actual": 11,
"ok": true
},
{
"name": "usable_sensors",
"expected": 8,
"actual": 8,
"ok": true
},
{
"name": "density_01_rows_multi_sensor",
"expected": 12670,
"actual": 12670,
"ok": true
}
],
"all_checks_ok": true
}