Understanding World Models Part 10 of 10
  1. 1 Your Time Series Is Already Training Data
  2. 2 A World Model in Forty Lines of TypeScript
  3. 3 The World Model Equation Is a WHERE Clause
  4. 4 Learning the Heater From Its Own Logs
  5. 5 Latent State Is the Fields You Never Logged
  6. 6 How a World Model Differs From an LLM, and Why You Want Both
  7. 7 Planning Against the Model
  8. 8 The Heater Room So Far, in Seven Posts
  9. 9 When the Model Doesn't Know
  10. 10 The Model Found the Warm-Up I Never Logged
About this series

The Model Found the Warm-Up I Never Logged

The Model Found the Warm-Up I Never Logged

This post fits the heater model from 104 to a real room instead of a simulated one. The data is six and a half months of hourly temperature readings from my office, with the weather outside and a sensor on the door. The building controls the heating, so the log has no record of it. You will see the model's one private field pick up a warm-up of about three-quarters of a degree an hour every morning, how that compares with a model that is simply given the time of day, why the door made no difference, and the October mornings the field gets wrong. The model has eleven weights and trains in 0.3 seconds.

My office has a sensor on the door. I put it there because a door seemed like the obvious thing that would change how the room behaves, and because 104 spent a whole post teaching a model to find a door it couldn't see. Six months later I fitted 104's model to the office's real log, held the door back as an answer key, and the door turned out not to matter at all. The thing that did matter was a warm-up of about three-quarters of a degree an hour every morning, which no sensor records and I hadn't noticed. The model's private field found it by itself.

The hidden state a model learns is whatever the inputs leave unexplained, which here was the heating and not the door.

The code is in tools/office_fit.ts and the hourly data is in office-hourly.csv, so everything below can be rerun.

The room and its log

The office is a small room in a serviced building in Ashford, Kent. Since April a Raspberry Pi has been logging four cheap Zigbee sensors and fetching the weather.

sensor what it reports in the log from
temperature and humidity (Sonoff SNZB-02P) on change, about every five to ten minutes 17 April
door contact (SNZB-04P) open or shut, on change and hourly 30 July
motion (SNZB-03P) occupied or not 30 July
smart plug, with a lamp on it signal strength only 30 July
OpenWeatherMap outside temperature and humidity, every twelve minutes 17 April

Averaged into hours, that is 4,426 hours with both a room reading and an outside reading, from 17 April to 3 November. The weather comes from a point in east London about 45 miles away, because that is where the hub's location was set, so “outside” below means roughly the right part of England. The weather feed went quiet from 19 to 29 June and the hub was offline from 20 to 24 September. The office also flooded on 4 September, which comes back at the end.

The office, every day from 17 April to 3 November 2026The room's daily range sits between about 20 and 27 degrees through spring and summer while the outside daily mean runs from about 9 to 28. The weather feed is missing from 19 to 29 June. On 4 September the flood arrives; on 7 September the door is propped open and stays open until 2 November; the hub is offline from 20 to 24 September. Through October the room runs cooler, 16 to 20 degrees, with outside between 7 and 17.door propped open0°8°16°24°32°MayJunJulAugSepOctNov17 Apr: room 18.7 to 25.2°C18 Apr: room 17.6 to 20.4°C19 Apr: room 17.0 to 21.5°C20 Apr: room 16.5 to 22.5°C21 Apr: room 16.8 to 21.8°C22 Apr: room 16.3 to 22.6°C23 Apr: room 16.6 to 22.5°C24 Apr: room 16.2 to 22.8°C25 Apr: room 16.5 to 20.5°C26 Apr: room 16.6 to 20.4°C27 Apr: room 16.7 to 22.9°C28 Apr: room 17.6 to 22.1°C29 Apr: room 17.3 to 23.0°C30 Apr: room 17.4 to 22.6°C01 May: room 18.0 to 23.0°C02 May: room 18.6 to 20.7°C03 May: room 18.6 to 20.1°C04 May: room 18.3 to 21.2°C05 May: room 18.0 to 22.8°C06 May: room 17.9 to 22.7°C07 May: room 17.9 to 22.4°C08 May: room 17.6 to 21.7°C09 May: room 18.1 to 22.2°C10 May: room 17.0 to 19.3°C11 May: room 16.3 to 21.8°C12 May: room 16.3 to 21.4°C13 May: room 17.3 to 21.9°C14 May: room 17.0 to 20.7°C15 May: room 16.7 to 21.0°C16 May: room 17.1 to 21.4°C17 May: room 17.4 to 19.8°C18 May: room 17.2 to 22.4°C19 May: room 17.8 to 22.6°C20 May: room 18.2 to 22.5°C21 May: room 18.3 to 22.2°C22 May: room 19.1 to 23.3°C23 May: room 20.1 to 23.4°C24 May: room 20.4 to 24.0°C25 May: room 21.2 to 22.8°C26 May: room 22.0 to 23.0°C27 May: room 21.8 to 22.8°C28 May: room 21.5 to 23.4°C29 May: room 22.6 to 23.7°C30 May: room 22.5 to 25.9°C31 May: room 22.8 to 24.5°C01 Jun: room 22.4 to 24.0°C02 Jun: room 21.9 to 23.4°C03 Jun: room 21.1 to 22.6°C04 Jun: room 20.9 to 23.7°C05 Jun: room 20.6 to 23.7°C06 Jun: room 20.2 to 21.0°C07 Jun: room 19.8 to 23.0°C08 Jun: room 19.9 to 22.2°C09 Jun: room 19.3 to 23.1°C10 Jun: room 19.3 to 23.3°C11 Jun: room 19.4 to 22.7°C12 Jun: room 20.1 to 23.3°C13 Jun: room 20.0 to 23.6°C14 Jun: room 20.0 to 24.0°C15 Jun: room 20.3 to 22.5°C16 Jun: room 20.6 to 24.0°C17 Jun: room 21.4 to 24.1°C18 Jun: room 21.1 to 24.1°C19 Jun: room 21.6 to 22.0°C29 Jun: room 22.3 to 24.4°C30 Jun: room 23.1 to 24.3°C01 Jul: room 22.2 to 24.2°C02 Jul: room 22.8 to 24.6°C03 Jul: room 22.1 to 24.8°C04 Jul: room 22.5 to 26.6°C05 Jul: room 23.6 to 26.6°C06 Jul: room 22.2 to 24.6°C07 Jul: room 22.1 to 24.2°C08 Jul: room 20.5 to 24.2°C09 Jul: room 21.8 to 24.4°C10 Jul: room 22.5 to 24.3°C11 Jul: room 23.6 to 27.2°C12 Jul: room 23.5 to 25.6°C13 Jul: room 22.8 to 24.2°C14 Jul: room 22.7 to 25.1°C15 Jul: room 23.0 to 23.5°C16 Jul: room 22.3 to 24.2°C17 Jul: room 22.5 to 24.1°C18 Jul: room 22.4 to 24.1°C19 Jul: room 21.7 to 25.0°C20 Jul: room 21.6 to 24.2°C21 Jul: room 21.9 to 23.5°C22 Jul: room 21.6 to 24.2°C23 Jul: room 21.7 to 23.5°C24 Jul: room 22.1 to 23.3°C25 Jul: room 22.6 to 26.0°C26 Jul: room 23.1 to 24.6°C27 Jul: room 22.0 to 23.8°C28 Jul: room 21.9 to 23.5°C29 Jul: room 21.6 to 23.5°C30 Jul: room 21.9 to 23.5°C31 Jul: room 21.9 to 23.5°C01 Aug: room 22.7 to 25.3°C02 Aug: room 22.8 to 26.4°C03 Aug: room 21.8 to 23.9°C04 Aug: room 21.9 to 23.8°C05 Aug: room 22.5 to 23.7°C06 Aug: room 22.2 to 25.8°C07 Aug: room 22.1 to 23.5°C08 Aug: room 22.2 to 26.2°C09 Aug: room 23.2 to 26.7°C10 Aug: room 22.0 to 24.6°C11 Aug: room 22.3 to 23.4°C12 Aug: room 21.8 to 23.6°C13 Aug: room 21.7 to 23.9°C14 Aug: room 21.9 to 24.0°C15 Aug: room 24.0 to 25.7°C16 Aug: room 23.7 to 26.8°C17 Aug: room 22.0 to 24.6°C18 Aug: room 22.7 to 23.9°C19 Aug: room 23.1 to 23.9°C20 Aug: room 22.3 to 23.4°C21 Aug: room 22.1 to 23.4°C22 Aug: room 21.5 to 24.6°C23 Aug: room 21.3 to 25.3°C24 Aug: room 21.6 to 24.0°C25 Aug: room 21.8 to 24.5°C26 Aug: room 22.0 to 24.4°C27 Aug: room 22.7 to 23.9°C28 Aug: room 22.1 to 23.3°C29 Aug: room 22.1 to 22.7°C30 Aug: room 21.8 to 25.1°C31 Aug: room 21.8 to 23.0°C01 Sep: room 21.4 to 24.2°C02 Sep: room 21.5 to 23.9°C03 Sep: room 22.0 to 23.5°C04 Sep: room 20.3 to 22.6°C05 Sep: room 20.2 to 22.2°C06 Sep: room 19.8 to 21.4°C07 Sep: room 20.2 to 24.5°C08 Sep: room 18.9 to 21.3°C09 Sep: room 18.5 to 25.2°C10 Sep: room 18.7 to 23.2°C11 Sep: room 19.0 to 24.0°C12 Sep: room 18.8 to 23.7°C13 Sep: room 19.1 to 19.8°C14 Sep: room 18.6 to 20.3°C15 Sep: room 18.7 to 19.4°C16 Sep: room 17.1 to 22.4°C17 Sep: room 16.8 to 18.2°C18 Sep: room 16.1 to 19.0°C19 Sep: room 18.9 to 20.6°C20 Sep: room 20.2 to 21.2°C24 Sep: room 20.4 to 20.4°C25 Sep: room 21.6 to 28.8°C26 Sep: room 22.7 to 27.4°C27 Sep: room 22.6 to 25.5°C28 Sep: room 20.4 to 23.6°C29 Sep: room 20.4 to 24.1°C30 Sep: room 21.6 to 22.3°C01 Oct: room 21.1 to 26.1°C02 Oct: room 20.1 to 25.4°C03 Oct: room 20.6 to 23.5°C04 Oct: room 20.8 to 26.5°C05 Oct: room 19.8 to 25.2°C06 Oct: room 21.7 to 25.8°C07 Oct: room 20.8 to 22.8°C08 Oct: room 19.3 to 25.8°C09 Oct: room 19.6 to 22.8°C10 Oct: room 19.9 to 24.8°C11 Oct: room 19.7 to 23.0°C12 Oct: room 19.9 to 21.2°C13 Oct: room 20.1 to 22.1°C14 Oct: room 19.6 to 23.5°C15 Oct: room 20.3 to 23.1°C16 Oct: room 18.4 to 21.8°C17 Oct: room 18.3 to 21.0°C18 Oct: room 17.9 to 18.6°C19 Oct: room 17.6 to 19.7°C20 Oct: room 17.7 to 17.9°C21 Oct: room 17.0 to 18.2°C22 Oct: room 16.8 to 19.4°C23 Oct: room 16.9 to 17.7°C24 Oct: room 16.5 to 17.5°C25 Oct: room 16.9 to 19.2°C26 Oct: room 16.7 to 17.6°C27 Oct: room 16.7 to 18.0°C28 Oct: room 16.1 to 19.3°C29 Oct: room 16.9 to 18.4°C30 Oct: room 16.7 to 19.1°C31 Oct: room 16.6 to 19.2°C01 Nov: room 16.6 to 17.4°C02 Nov: room 16.4 to 19.4°C03 Nov: room 16.0 to 17.2°Cflood, 4 Sephub offlineno weather19 to 29 JunRoom, daily range and meanOutside, daily mean
Every day in the log. The bars are the room's daily range, the blue line its daily mean, and the grey line the mean outside. From May to August the outside mean swings between about 8 and 28 degrees and the room barely notices. The flood arrives on 4 September and the door is propped open on the 7th, where it stays until 2 November.Download the data (CSV)

In the simulated room the log had three fields: the room, the outside, and whether the heater was on. This log has the first two and nothing in the third. The building runs the heating and doesn't tell my Pi, and the only thing in the room I can switch is a lamp.

What three weights make of it

With no heater column, the 103 model drops to three weights: the room, the outside and a bias. Fitted to the 2,895 hourly transitions before the flood, with the inputs centred and scaled as in 104, it learns that the room loses 0.025 degrees an hour for every degree it sits above 21, and gains 0.0012 an hour for every degree the outside is above 14. In the simulation those two numbers were equal and opposite. Here the outside barely registers, and the model says this room settles at about 22 degrees whatever the weather does.

That is a building with a thermostat, read straight from the logs, and three weights can't say anything more about it. Scored one hour ahead, the model's error is 0.407 degrees. Guessing “the same as now” every hour gets 0.410.

One private field

The model from 104, with the heater input taken out, keeps one number to itself. act predicts the next hour from the room, the outside and that number. observe updates the number from what the room just did.

act(state: Hour): number {
  const f = inputs(state), w = this.w;
  const base = w.room * f.room + w.outside * f.outside + w.bias;
  const extra = w.fieldRoom * f.room + w.fieldOutside * f.outside + w.fieldBias;
  return state.roomTemp + base + this.#field * extra;
}

observe(state: Hour, nextState: Hour) {
  const f = inputs(state), w = this.w;
  const change = nextState.roomTemp - state.roomTemp;
  this.#field = Math.tanh(w.uField * this.#field + w.uRoom * f.room + w.uOutside * f.outside + w.uChange * change + w.uBias);
}

Each local day is an episode, so the field starts at zero at midnight, and training walks each day forwards and back as in 104. Eleven weights, 126 days, three thousand epochs, 0.3 seconds. On those days its one-hour error is 0.276, a third lower than the three-weight model's.

The field isn't labelled, so to see what it learned I averaged it by hour of day.

What an average hour does to the room, by time of dayTop: from midnight to 5am the room cools by about a tenth of a degree an hour. Between 7 and 9am it warms by 0.7 degrees an hour from April to August, and by 0.85 between 8 and 9 in October, then cools again. Bottom: the latent model's private field, averaged by hour, sits near zero overnight and in the afternoon and dips to about minus 0.5 during the morning warm-up, an hour later in October than in summer.-0.3°0+0.3°+0.6°+0.9°change in the next hour, °CApr to Aug, 00:00: -0.15°C in the next hourApr to Aug, 01:00: -0.14°C in the next hourApr to Aug, 02:00: -0.12°C in the next hourApr to Aug, 03:00: -0.12°C in the next hourApr to Aug, 04:00: -0.10°C in the next hourApr to Aug, 05:00: +0.02°C in the next hourApr to Aug, 06:00: +0.10°C in the next hourApr to Aug, 07:00: +0.74°C in the next hourApr to Aug, 08:00: +0.67°C in the next hourApr to Aug, 09:00: +0.33°C in the next hourApr to Aug, 10:00: +0.10°C in the next hourApr to Aug, 11:00: -0.00°C in the next hourApr to Aug, 12:00: -0.04°C in the next hourApr to Aug, 13:00: +0.00°C in the next hourApr to Aug, 14:00: -0.01°C in the next hourApr to Aug, 15:00: -0.02°C in the next hourApr to Aug, 16:00: -0.08°C in the next hourApr to Aug, 17:00: -0.10°C in the next hourApr to Aug, 18:00: -0.16°C in the next hourApr to Aug, 19:00: -0.18°C in the next hourApr to Aug, 20:00: -0.19°C in the next hourApr to Aug, 21:00: -0.20°C in the next hourApr to Aug, 22:00: -0.18°C in the next hourApr to AugOctober, 00:00: -0.05°C in the next hourOctober, 01:00: -0.07°C in the next hourOctober, 02:00: -0.05°C in the next hourOctober, 03:00: -0.03°C in the next hourOctober, 04:00: -0.04°C in the next hourOctober, 05:00: -0.03°C in the next hourOctober, 06:00: -0.03°C in the next hourOctober, 07:00: +0.28°C in the next hourOctober, 08:00: +0.85°C in the next hourOctober, 09:00: +0.45°C in the next hourOctober, 10:00: -0.11°C in the next hourOctober, 11:00: -0.22°C in the next hourOctober, 12:00: -0.17°C in the next hourOctober, 13:00: -0.15°C in the next hourOctober, 14:00: -0.12°C in the next hourOctober, 15:00: -0.10°C in the next hourOctober, 16:00: -0.08°C in the next hourOctober, 17:00: -0.10°C in the next hourOctober, 18:00: -0.09°C in the next hourOctober, 19:00: -0.08°C in the next hourOctober, 20:00: -0.08°C in the next hourOctober, 21:00: -0.08°C in the next hourOctober, 22:00: -0.08°C in the next hourOctoberthe latent model's private field, average for that hour-0.6-0.4-0.200.2Apr to Aug, 00:00: field +0.00Apr to Aug, 01:00: field +0.01Apr to Aug, 02:00: field -0.01Apr to Aug, 03:00: field -0.03Apr to Aug, 04:00: field -0.04Apr to Aug, 05:00: field -0.06Apr to Aug, 06:00: field -0.17Apr to Aug, 07:00: field -0.21Apr to Aug, 08:00: field -0.52Apr to Aug, 09:00: field -0.42Apr to Aug, 10:00: field -0.26Apr to Aug, 11:00: field -0.10Apr to Aug, 12:00: field -0.04Apr to Aug, 13:00: field +0.00Apr to Aug, 14:00: field -0.02Apr to Aug, 15:00: field +0.01Apr to Aug, 16:00: field +0.02Apr to Aug, 17:00: field +0.07Apr to Aug, 18:00: field +0.07Apr to Aug, 19:00: field +0.12Apr to Aug, 20:00: field +0.10Apr to Aug, 21:00: field +0.10Apr to Aug, 22:00: field +0.08Apr to AugOctober, 00:00: field +0.00October, 01:00: field -0.10October, 02:00: field -0.06October, 03:00: field -0.09October, 04:00: field -0.10October, 05:00: field -0.09October, 06:00: field -0.10October, 07:00: field -0.10October, 08:00: field -0.32October, 09:00: field -0.48October, 10:00: field -0.29October, 11:00: field +0.01October, 12:00: field +0.06October, 13:00: field +0.03October, 14:00: field +0.04October, 15:00: field +0.01October, 16:00: field +0.00October, 17:00: field -0.01October, 18:00: field -0.01October, 19:00: field -0.03October, 20:00: field -0.04October, 21:00: field -0.04October, 22:00: field -0.04October00:0003:0006:0009:0012:0015:0018:0021:00local time at the start of the hour
Top: the average change in the room over the next hour, by local time. From April to August it cools by about a tenth of a degree an hour overnight, then warms by 0.74 degrees in the hour from 07:00 and 0.67 in the hour from 08:00. In October the warm-up comes an hour later and ends sooner. Bottom: the private field, averaged the same way. It sits near zero all day except the morning.Download the data (CSV)

The field sits near zero overnight and through the afternoon, and drops to -0.52 at 08:00. The top half of the chart shows why. Something warms this room by about three-quarters of a degree an hour every morning, Saturdays and Sundays included. It is the largest single thing that happens to the room, and nothing in the log records it. I didn't know it was there until the field pointed at it.

The weights say how. An hour that warmed pushes the field negative, and a negative field adds warmth to the next hour's prediction: at -0.5, about two-thirds of a degree, which is the size of the warm-up. The field has almost no memory, so it reads each hour fresh. That suits a warm-up that lasts two or three hours and stops.

Is it just learning the clock?

A warm-up at the same time every day is a timetable, and the obvious way to model a timetable is to hand the model the clock. So I fitted one more model: room, outside, and a separate bias for every hour of the day, 25 weights by least squares. If the field is only rediscovering the time of day, this timetable model should do as well.

one hour ahead, rms error in degrees hours same as now three-weight timetable latent
April to August (fitted) 2,895 0.410 0.407 0.324 0.276
the flood, 4 to 20 September 322 0.599 0.596 0.517 0.508
drying out, 24 September to 6 October 274 0.656 0.650 0.547 0.518
October 599 0.417 0.423 0.380 0.402

Mostly, yes. The timetable model gets most of the way, from 0.410 to 0.324. The field takes it on to 0.276, because it reacts to the hour the warm-up actually starts, which varies from day to day.

One June day and one October day, an hour at a timeLeft, 18 June: the room sits at 21 degrees overnight, rises to 23.6 between 7am and noon and drifts down in the evening. The three-weight model's one-hour predictions trail the room by an hour; the latent model's catch the warm-up from its second hour, when its field drops to minus 0.7. Right, 22 October: the room sits near 17, warms by nearly two and a half degrees between 8 and 10am and cools slowly through the afternoon. The latent model predicts a little warming all night, and its field keeps the warm-up switched on after it has eased off, so it forecasts 20.4 for a room that reached 19.5 and 20.2 for one that had dropped back to 19.0.Thursday 18 June20°22°24°26°28°three-weight, predicted for 01:00: 21.86°Cthree-weight, predicted for 02:00: 21.69°Cthree-weight, predicted for 03:00: 21.58°Cthree-weight, predicted for 04:00: 21.39°Cthree-weight, predicted for 05:00: 21.31°Cthree-weight, predicted for 06:00: 21.20°Cthree-weight, predicted for 07:00: 21.13°Cthree-weight, predicted for 08:00: 21.23°Cthree-weight, predicted for 09:00: 22.11°Cthree-weight, predicted for 10:00: 22.73°Cthree-weight, predicted for 11:00: 23.38°Cthree-weight, predicted for 12:00: 23.58°Cthree-weight, predicted for 13:00: 23.38°Cthree-weight, predicted for 14:00: 23.23°Cthree-weight, predicted for 15:00: 23.75°Cthree-weight, predicted for 16:00: 24.07°Cthree-weight, predicted for 17:00: 23.52°Cthree-weight, predicted for 18:00: 23.09°Cthree-weight, predicted for 19:00: 22.80°Cthree-weight, predicted for 20:00: 22.70°Cthree-weight, predicted for 21:00: 22.54°Cthree-weight, predicted for 22:00: 22.42°Cthree-weight, predicted for 23:00: 22.26°Clatent, predicted for 01:00: 21.79°Clatent, predicted for 02:00: 21.51°Clatent, predicted for 03:00: 21.51°Clatent, predicted for 04:00: 21.20°Clatent, predicted for 05:00: 21.27°Clatent, predicted for 06:00: 21.09°Clatent, predicted for 07:00: 21.10°Clatent, predicted for 08:00: 21.36°Clatent, predicted for 09:00: 22.74°Clatent, predicted for 10:00: 23.04°Clatent, predicted for 11:00: 23.69°Clatent, predicted for 12:00: 23.61°Clatent, predicted for 13:00: 23.28°Clatent, predicted for 14:00: 23.21°Clatent, predicted for 15:00: 24.01°Clatent, predicted for 16:00: 24.12°Clatent, predicted for 17:00: 23.17°Clatent, predicted for 18:00: 22.93°Clatent, predicted for 19:00: 22.67°Clatent, predicted for 20:00: 22.69°Clatent, predicted for 21:00: 22.43°Clatent, predicted for 22:00: 22.35°Clatent, predicted for 23:00: 22.12°Creal room at 01:00: 21.67°Creal room at 02:00: 21.56°Creal room at 03:00: 21.37°Creal room at 04:00: 21.28°Creal room at 05:00: 21.17°Creal room at 06:00: 21.10°Creal room at 07:00: 21.20°Creal room at 08:00: 22.10°Creal room at 09:00: 22.74°Creal room at 10:00: 23.40°Creal room at 11:00: 23.60°Creal room at 12:00: 23.40°Creal room at 13:00: 23.24°Creal room at 14:00: 23.78°Creal room at 15:00: 24.10°Creal room at 16:00: 23.54°Creal room at 17:00: 23.10°Creal room at 18:00: 22.80°Creal room at 19:00: 22.70°Creal room at 20:00: 22.54°Creal room at 21:00: 22.42°Creal room at 22:00: 22.25°Creal room at 23:00: 22.12°C-0.500.5field used for 01:00: +0.00field used for 02:00: +0.10field used for 03:00: -0.01field used for 04:00: +0.10field used for 05:00: -0.04field used for 06:00: +0.02field used for 07:00: -0.03field used for 08:00: -0.17field used for 09:00: -0.72field used for 10:00: -0.45field used for 11:00: -0.54field used for 12:00: -0.10field used for 13:00: +0.20field used for 14:00: +0.11field used for 15:00: -0.48field used for 16:00: -0.12field used for 17:00: +0.54field used for 18:00: +0.22field used for 19:00: +0.21field used for 20:00: +0.05field used for 21:00: +0.17field used for 22:00: +0.09field used for 23:00: +0.1400:0006:0012:0018:00private fieldThursday 22 October16°18°20°22°24°three-weight, predicted for 01:00: 17.00°Cthree-weight, predicted for 02:00: 16.93°Cthree-weight, predicted for 03:00: 16.93°Cthree-weight, predicted for 04:00: 16.96°Cthree-weight, predicted for 05:00: 17.04°Cthree-weight, predicted for 06:00: 17.12°Cthree-weight, predicted for 07:00: 17.12°Cthree-weight, predicted for 08:00: 17.12°Cthree-weight, predicted for 09:00: 17.14°Cthree-weight, predicted for 10:00: 18.85°Cthree-weight, predicted for 11:00: 19.51°Cthree-weight, predicted for 12:00: 19.08°Cthree-weight, predicted for 13:00: 18.78°Cthree-weight, predicted for 14:00: 18.59°Cthree-weight, predicted for 15:00: 18.40°Cthree-weight, predicted for 16:00: 18.20°Cthree-weight, predicted for 17:00: 18.01°Cthree-weight, predicted for 18:00: 17.91°Cthree-weight, predicted for 19:00: 17.81°Cthree-weight, predicted for 20:00: 17.64°Cthree-weight, predicted for 21:00: 17.61°Cthree-weight, predicted for 22:00: 17.61°Cthree-weight, predicted for 23:00: 17.61°Clatent, predicted for 01:00: 16.87°Clatent, predicted for 02:00: 16.95°Clatent, predicted for 03:00: 17.05°Clatent, predicted for 04:00: 17.10°Clatent, predicted for 05:00: 17.28°Clatent, predicted for 06:00: 17.29°Clatent, predicted for 07:00: 17.15°Clatent, predicted for 08:00: 17.20°Clatent, predicted for 09:00: 17.26°Clatent, predicted for 10:00: 20.39°Clatent, predicted for 11:00: 20.16°Clatent, predicted for 12:00: 18.27°Clatent, predicted for 13:00: 18.65°Clatent, predicted for 14:00: 18.35°Clatent, predicted for 15:00: 18.19°Clatent, predicted for 16:00: 17.94°Clatent, predicted for 17:00: 17.76°Clatent, predicted for 18:00: 17.80°Clatent, predicted for 19:00: 17.66°Clatent, predicted for 20:00: 17.43°Clatent, predicted for 21:00: 17.68°Clatent, predicted for 22:00: 17.63°Clatent, predicted for 23:00: 17.67°Creal room at 01:00: 16.80°Creal room at 02:00: 16.80°Creal room at 03:00: 16.83°Creal room at 04:00: 16.92°Creal room at 05:00: 17.00°Creal room at 06:00: 17.00°Creal room at 07:00: 17.00°Creal room at 08:00: 17.02°Creal room at 09:00: 18.77°Creal room at 10:00: 19.45°Creal room at 11:00: 19.00°Creal room at 12:00: 18.70°Creal room at 13:00: 18.50°Creal room at 14:00: 18.30°Creal room at 15:00: 18.10°Creal room at 16:00: 17.90°Creal room at 17:00: 17.80°Creal room at 18:00: 17.70°Creal room at 19:00: 17.53°Creal room at 20:00: 17.50°Creal room at 21:00: 17.50°Creal room at 22:00: 17.50°Creal room at 23:00: 17.50°C-0.500.5field used for 01:00: +0.00field used for 02:00: -0.07field used for 03:00: -0.11field used for 04:00: -0.12field used for 05:00: -0.16field used for 06:00: -0.13field used for 07:00: -0.06field used for 08:00: -0.09field used for 09:00: -0.11field used for 10:00: -0.95field used for 11:00: -0.49field used for 12:00: +0.41field used for 13:00: +0.03field used for 14:00: +0.10field used for 15:00: +0.09field used for 16:00: +0.12field used for 17:00: +0.12field used for 18:00: +0.03field used for 19:00: +0.04field used for 20:00: +0.07field used for 21:00: -0.08field used for 22:00: -0.06field used for 23:00: -0.0800:0006:0012:0018:00Real roomThree-weight, one hour aheadLatent, one hour ahead
Two days, one hour at a time. Each dot is a model's prediction for that hour, made from the reading an hour earlier. Left, Thursday 18 June: the warm-up starts at 07:00, the three-weight model trails it by an hour all morning, and the latent model catches it from the second hour, once its field has dropped to -0.72. Right, Thursday 22 October: the room is four degrees colder, the warm-up is sharper and shorter, and the field keeps adding warmth after the warm-up has eased off.Download the data (CSV)

These two days are from the middle of their months, not the best of them. On 18 June the first hour of the warm-up catches both models out, as step 11 did in 104, because nothing has happened yet for the field to read. From the second hour the field has seen the room move. Across April to August, the error for the hour from 08:00 drops from 1.02 degrees to 0.52.

The timetable model works because I already knew to give it the hour of day. The field was never given the time.

The door it ignored

The door is the one thing in the log the model is never shown, which makes it an answer key. If the field had picked up the door, it would differ between hours with the door open and hours with it shut. It doesn't: -0.052 over the 1,121 open hours, -0.046 over the 901 shut ones.

In fairness to the field, the door gave it nothing to find. It opens onto an inside corridor that is probably the same temperature as the room, and in the hourly log it changes state twice in fourteen weeks: open on 7 September, shut on 2 November. 104's door moved 310 times in 4,800 steps. Given the door as an input, the timetable model concludes that the room follows the outside temperature slightly less while the door is open. An open door doesn't do that. The autumn arrived the same week, and with only two changes in the log there is no telling the door's effect from the season's.

Where it stops

October is the one stretch where the timetable model does better, 0.380 against 0.402. The right-hand day shows why. The room sits near 17 degrees, colder than the summer that taught the model this room drifts back towards 22, and the warm-up comes as one sharp hour rather than two or three steady ones. The field switches on at 09:00, exactly as summer taught it, and adds a summer warm-up to hours that no longer have one: 20.4 predicted for a room that reached 19.5. Refitting on all six months only brings October to 0.378. A single field can't represent both the summer warm-up and the October one.

What to log

I added a door sensor because I could picture a door changing a room. I didn't add anything for the heating because I don't control it and couldn't picture it.

So log the plain readings densely and for a long time, and let a model with a little private state show where the unexplained behaviour is. Then go and find out what it is. I still don't know what warms this office at eight every morning. A timer on the building's heating would do it, and so would the sun through an east-facing window. The field can't tell me which. What it gave me is a precise question, about three-quarters of a degree an hour starting at 07:00 in summer and 08:00 in October, which is far more than the door sensor ever told me.

The flood

The temperature model barely noticed the flood. The flood is in the humidity, which none of these models reads. From about two in the morning on 4 September, with nobody in the office until 06:27, the room's humidity climbed from 66.8 percent to 76.5, and by the next day its air held 5.7 grams of water per cubic metre more than the outside air, against a summer range of -2.5 to +3.4. Whether a model watching that column would have raised the alarm before anyone walked in is a question for the monitor in the next post, and the office is where it gets tested.

Running it yourself

node --no-warnings tools/office_fit.ts reads office-hourly.csv, fits all four models, prints every number in this post and writes the CSVs behind the charts. tools/office_export.sh shows how the CSV was made from the hub's databases. I left the motion sensor out of the published data, since it is a record of when I'm at my desk, and the weather rows went in without their coordinates. A different seed finds different weights and the same two results.