@@ -80,9 +80,6 @@ class MpcParams:
8080 perf_curve_bin_pct : float = 2.0
8181
8282
83-
84-
85-
8683@dataclass
8784class MpcInput :
8885 """Input parameters for MPC calibration calculation."""
@@ -380,7 +377,6 @@ def build_mpc_key(bt, entity_id: str) -> str:
380377 return f"{ uid } :{ entity_id } :{ bucket } "
381378
382379
383-
384380def _detect_regime_change (recent_errors : list [float ]) -> bool :
385381 """Detect systematic bias in prediction errors using Student's t-test.
386382
@@ -1099,7 +1095,7 @@ def _compute_predictive_percent(
10991095 common_ok
11001096 and learn_signal
11011097 and u_last <= min_open
1102- and observed_rate < - 0.01
1098+ and observed_rate < 0.0 # Allow learning even on slow cooling
11031099 ):
11041100 loss_candidate = max (0.0 , - observed_rate )
11051101
@@ -1206,7 +1202,6 @@ def _compute_predictive_percent(
12061202 gain_method = "insufficient_heat_boost"
12071203 adapt_debug ["gain_boosted_insuff" ] = True
12081204
1209-
12101205 # --- LOSS learning (warming with low valve): ---
12111206 # If we are below u0 but the room is warming, loss is overestimated.
12121207 # This handles the case where residual_u0_ss fails because rate is too high (warming).
@@ -1215,7 +1210,7 @@ def _compute_predictive_percent(
12151210 and learn_signal
12161211 and (not updated_loss )
12171212 and u_last < (u0_frac_est - 0.05 )
1218- and observed_rate > 0.01
1213+ and observed_rate > 0.0
12191214 ):
12201215 # We are warming, so gain*u > loss.
12211216 # Since u is small, loss must be very small.
0 commit comments