Bias vs. Variance - Part 3/5 ML-only empirical model

ML-Only Boiler Power Prediction Demo

Learning heating-cycle patterns from historical power data

Looks precise. But is it inside the training range?
ML learns history. But reality can leave the training range. The model predicts power from historical patterns - not from physical equations.
ML profile state
0 W
HeaterOFF
Cycle time0.0 min
Intensity classHigh

Simulation inputs

The ML model receives only inferred usage intensity and elapsed cycle time.

60-80% historical bin

This value is inferred from historical cycle energy. It is not a directly measured outlet-flow signal.

Advanced physical reference parameters Elnett EUN 5 defaults
30.3 °C

The reference is integrated with a one-second step using energy balance, heat loss, and thermostat hysteresis. Continuous outlet flow during reheating is zero by default; prior usage is represented by the calculated lower start temperature.

Outside dense training range

Prediction may look precise but may not be meaningful.

12historical training cycles

Physics-informed data filter

Elnett EUN 5 reference: 5 L, 2 kW, measured 18 °C inlet and 59 °C maximum hot-water temperature.

Representative-only ML training
Total detected cycles-
Representative used for ML-
Rare / possible draw-off-
Implausible / excluded-
Ideal full heat-up energy-
Ideal full heat-up time-

Very long cycles may indicate continuous water draw-off, merged cycles, missing data, or measurement artefacts. The ML profile is trained only on representative cycles.

Detected heating-cycle energy distribution

All detected cycles are retained. Stacked colors distinguish representative, rare possible, and excluded events.

Counter delta
Representative Rare / possible Implausible / artifact
Median-
P75-
P90-
Maximum-

Data contract

The empirical model now preserves the semantics of the updated Shelly export.

P
Power profileMaximum observed power per one-minute bin.
E
Cycle energyAuthoritative cumulative counter delta, never average-power integration when Gesamtenergie is present.
ML
Empirical surrogateAligned historical max-power profiles grouped by inferred usage intensity from cycle energy.

Historical heating cycles learned by the ML model

Representative cycles are shown by default. Thin traces approximate historical variation; rare and excluded profiles can be enabled for comparison.

Selected: 60-80%

ML-only predicted power profile

Interpolated historical mean with a +/-1 standard-deviation uncertainty band.

ML-only prediction Uncertainty Current time

Physical model vs ML-only power prediction

The green curve is generated by numerical integration of thermal energy balance, flow, heat loss, and thermostat hysteresis.

ML-only prediction Physical reference from estimated start temperature

Start temperature for physical reference: max(cold inlet, min(usage-derived temperature, switch-on threshold))

The same usage-intensity slider selects a historical ML profile and sets the initial temperature of the physical reference model. The ML model itself remains purely data-driven.

Current ML power
0 W
Historical profile surrogate
Physical reference
0 W
Energy-balance model
Current difference
0 W
Mean absolute difference: 0 W
Training evidence
Sparse
11 cycles in selected class

What the ML-only model learns

A transparent empirical workflow built from repeated historical power events.

1The model sees historical one-minute maximum-power cycles from the Shelly smart plug.
2Heating cycles are aligned by cycle start on a common one-minute time axis.
3Gesamtenergie end-minus-start infers usage intensity; no hydraulic outlet-flow signal was measured.
4The model predicts a typical power profile for similar historical cycles.
5It does not know water temperature, thermal mass, heat loss, inlet conditions, or physical laws.

ML learns history. Physics explains behavior.

Both approaches can be useful, but their failure modes are different.

Physical modelCalculates behavior from equations, assumptions, material properties, and boundary conditions.
ML-only modelPredicts behavior from historical patterns. It is flexible where examples are dense and risky where they are sparse.
Why hybrid models matterPhysics can provide structure while ML learns residual patterns the simplified equations do not capture.
ML demo self-check: pending