Score the full model against the base model; compile the search step
Validation: the walk-forward evaluator now replays all zones together with the full model (electrical heat, neighbour exchange, ventilation and recovery) using the parameters frozen at the forecast start and the electrical heat and window openings that actually happened, and scores the base 3-parameter model on the same spans. Forecast Error sensors add base_model_mae and improvement_vs_base (share of the base model's error the new features remove; 0 = no gain, negative = worse). Saved 0.3 statistics load with their own error as the base column. On synthetic apartments, 60-minute error full vs base: gaming office 0.031 vs 0.182 °C (83 % better), bedroom with ventilation 0.026 vs 0.218 °C (88 %), two coupled rooms 0.024 vs 0.037 °C (34 %; gone by 120 min, where the constant-outdoor assumption dominates). The same ventilation week without window sensors shows no improvement, as it should. These check the method, not real-world accuracy. Performance: every term of a zone's 5-minute change is affine in the zone temperatures and the radiator lag, and which layer applies depends only on which inputs exist. compile_step_model reads the coefficients off the real model per zone and step, so the plan search does a few multiply-adds per step. It matches the direct model to 1e-12 and makes a 180-minute, 5-zone search 4.5x faster (0.73 s here, close to the old base-only search). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8d197fabcd
commit
b1577a0c78
7 files changed
+266
-31
No files matched your search
@@ -164,13 +164,15 @@ class MPCForecastError(CoordinatorEntity, SensorEntity):
|
||||
"bias": accuracy.get("bias"),
|
||||
"persistence_mae": accuracy.get("persistence_mae"),
|
||||
"skill": accuracy.get("skill"),
|
||||
"base_model_mae": accuracy.get("base_model_mae"),
|
||||
"improvement_vs_base": accuracy.get("improvement_vs_base"),
|
||||
# Per zone, by name.
|
||||
"zones": {self.coordinator.zones[key].name if key in self.coordinator.zones else key: stats
|
||||
for key, stats in accuracy.get("rooms", {}).items()},
|
||||
"window_days": WINDOW_DAYS,
|
||||
"unit_of_attributes": "°C",
|
||||
"basis": ("thermal model replayed with the actual relay history; outdoor "
|
||||
"temperature held at the start value"),
|
||||
"basis": ("all zones replayed together with the actual relay, electrical heat and "
|
||||
"window history; outdoor temperature held at the start value"),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user