Thibaut Forest Claude Opus 5 (1M context) commited on
Commit ·
227c214
1
Parent(s): 596925f
all48oof static: EXACT leave-one-building-out predictions per user spec (24 models on 23 buildings each, was 5 fold models on ~19); SCORE 1913.3 -> 1877.3
Browse files
batteryswap_example/cv.py
CHANGED
|
@@ -655,7 +655,14 @@ def run_all48_oof(n_folds=5, seed=0, origins=range(48),
|
|
| 655 |
.drop_duplicates('device_id')
|
| 656 |
.set_index('device_id')['building_id'])
|
| 657 |
closed = t[t['origin'] <= t['origin'].max() - pd.Timedelta(days=WINDOW_DAYS)]
|
| 658 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 659 |
|
| 660 |
p = mc.plan_tsroute
|
| 661 |
p.alpha, p.p_be, p.floor_day, p.p_conf = CHAMPION['p_star'], 0.0, 0, 0.5
|
|
|
|
| 655 |
.drop_duplicates('device_id')
|
| 656 |
.set_index('device_id')['building_id'])
|
| 657 |
closed = t[t['origin'] <= t['origin'].max() - pd.Timedelta(days=WINDOW_DAYS)]
|
| 658 |
+
if fit == 'static':
|
| 659 |
+
# EXACT leave-one-building-out predictions (user spec 2026-08-22):
|
| 660 |
+
# every device's model excludes precisely its own building - 24
|
| 661 |
+
# models on 23 buildings each, not 5 fold models on ~19. Folds are
|
| 662 |
+
# only a cost-saving for the per-origin walkforward variant.
|
| 663 |
+
bldg_fold = pd.Series({b: b for b in dev_bldg.unique()})
|
| 664 |
+
else:
|
| 665 |
+
bldg_fold = building_folds(closed, dev_bldg, n_folds, seed)
|
| 666 |
|
| 667 |
p = mc.plan_tsroute
|
| 668 |
p.alpha, p.p_be, p.floor_day, p.p_conf = CHAMPION['p_star'], 0.0, 0, 0.5
|