知識がなくても始められる、AIと共にある豊かな毎日。
AI Life and Home Appliances

Counting Condensation-Prone Hours From Room-by-Room Humidity Logs: Letting AI Read Winter Data From UK Homes and Checking the Dew-Point Math With a Script

swiftwand

Window condensation forms when the dew point of the room air rises above the temperature of the room-side surface of the window. In Why Does Winter Condensation Form on Windows? Dew Point, Window Surface Temperature, and Measuring, Ventilating, Then Insulating (published 2026-11-30), we assumed a room temperature of 20°C and calculated, from January outdoor temperatures in five Japanese cities, the relative humidity at which a window starts to condense. Real room temperature and humidity, however, move through the day and differ from room to room. So in this article we read a room humidity log recorded in real homes, hour by hour and room by room, and counted what share of winter is made up of hours in which the calculation says condensation would form if that room had single-glazed windows.

This article contains affiliate links. As an Amazon Associate, we earn from qualifying purchases.

We used the IDEAL Household Energy Dataset (IDEAL below), a public dataset that recorded the temperature and humidity of each room in 255 homes around Edinburgh, Scotland. Of the 255 homes, 225 have winter data (December to February), and after applying uniform conditions, 210 homes and 1,243 rooms went into the analysis. We did not measure any room or window ourselves. IDEAL also has no record of the type of window glass, so the calculation places the same hypothetical window in every room.

The results first. If the windows are assumed to be single glazing, the share of winter hours in which condensation could form has a median of 43.3% across rooms. If they are assumed to be double glazing, the median is 0%. By time of day, using the timestamp of the hourly values, such hours are most common in the evening from 20:00 to 22:00 and at 08:00 in the morning, and least common from 13:00 to 15:00 in the afternoon.

In the second half, we gave AI a table of 7 days (168 hours) for two rooms, had it do the same calculation, and checked it against the correct answers. claude -p (Claude Sonnet 5.5) got every question right, both when the table was pasted into the prompt and when it was asked to run Python. The local gemma4:12b, on the other hand, returned answers in 2.0 to 2.9 seconds with thinking off but got every one wrong, and with thinking on it hit the context limit and produced no answer. Each condition was run once.

忍者AdMax

What the humidity log records: room-by-room values in IDEAL

What the humidity log records: room-by-room values in IDEAL

IDEAL is a dataset published by the University of Edinburgh (School of Informatics) on Edinburgh DataShare on April 23, 2021, under a CC BY 4.0 license. The data is described in a 2021 paper in Scientific Data. It covers 255 homes in the City of Edinburgh and the surrounding Lothians and southern Fife, from August 2016 to June 2018. Participation periods differ by home, averaging 286 days according to the paper. In addition to electricity and gas use, the temperature, humidity, and light in each room were recorded every 12 seconds.

According to the conditions in the overview document, participating homes heat most rooms with gas central heating and use a gas combi boiler. Under the same conditions, homes with heat pumps or mechanical ventilation with heat recovery were excluded. This is a group with fairly uniform heating and ventilation, and its assumptions differ from those of Japanese homes.

Temperature and humidity were measured by a Sensirion SHT21 mounted in a sensor box built by the project. The manufacturer’s current datasheet (the October 2022 version) gives a typical accuracy of ±2 %RH for relative humidity and ±0.3°C for temperature. The paper, however, says it assumed the temperature and humidity sensors were accurate within the manufacturer’s specifications and did not verify their calibration.

There were also rules about placement. According to the paper, installers avoided placing sensors above radiators, near windows that can be opened, on exterior walls, and in direct sunlight. So the log represents the temperature and humidity of air away from the windows, not the air near a window or the window surface temperature. Boxes whose humidity might be inaccurate because of where they were placed were flagged by the installer (humidityInaccuracy).

What we used is not the 12-second values themselves but the hourly aggregates distributed with IDEAL. According to the documentation, these are the mean of the readings available in that hour, and in hours with many gaps they may not be a good estimate of the real value. Hours with no readings have no row at all. Across all rooms, from each room’s first to last hour of hourly humidity values, 12.2% of hours had no row (12.5% when counting hours with both temperature and humidity). Conversely, hours with only a few readings still appear as one row, as a mean.

The values are in units of 0.1°C and 0.1 %RH, so we divided by 10 to get °C and %. Timestamps are in Coordinated Universal Time (UTC). From December to February the UK is on Greenwich Mean Time (GMT), so winter UTC timestamps are the same as UK clock time. Neither the documentation nor the paper says, however, whether the timestamp of an hourly value marks the start or the end of that hour. In this article, times of day are given as the timestamp of the hourly value.

The room records include the room type (type in room.csv), whether there are windows facing outside (externalwindows), whether there are windows that can be opened (windowsopen), and how often laundry is dried in that room (clothesdrying). On the other hand, neither the home records nor the room records have fields for the type of window glass, the sash, or insulation. The participation conditions include having no plans for major works, such as switching to double glazing, before June 2018, but which homes have single-glazed windows is unknown.

Comparing the hourly dew point with a hypothetical window surface temperature

Comparing the hourly dew point with a hypothetical window surface temperature

The calculation has three steps. First, compute the dew point of the room air for each hour. The dew point is the temperature at which air becomes saturated with water vapor and starts to condense. We used the Magnus-type approximation (over water, −45 to 60°C) in the WMO (World Meteorological Organization) observation guide, calculated from the hourly mean room temperature and mean relative humidity.

ew(t) = 6.112 × exp(17.62 × t ÷ (243.12 + t)) ... saturation vapor pressure (hPa), t is room temperature (°C)
x = ln((RH ÷ 100) × ew(t) ÷ 6.112) ... RH is relative humidity (%)
td = 243.12 × x ÷ (17.62 − x) ... dew point (°C)

The dew point here is not the average of dew points computed from the 12-second values. Because the formula is not linear, the two do not match. We did not check how large the difference is.

Next, compute the room-side surface temperature of the window for that hour. The formula follows the form in a document from the Forest Products Research Institute of the Hokkaido Research Organization; we rewrote the symbols.

Ts = Ti − U × Rsi × (Ti − To)
Ti : room temperature (°C), To: outdoor temperature (°C)
U : window thermal transmittance (W/m²K)
Rsi: room-side surface thermal resistance (m²K/W)

For U we used the reference center-of-glass thermal transmittance in the technical information from the Building Research Institute (BRI): 6.0 W/m²K for single glazing and 2.9 W/m²K for double glazing (12 mm cavity, no Low-E). Rsi is 0.13 m²K/W, the value for glazing and frames in ISO 13788 (checked in a free preview of an older edition). Finally, we counted hours in which the dew point is at or above Ts as hours in which that window would condense. In this article we call these condensation-prone hours.

Where the formulas come from and how the values were chosen are explained in detail in the 2026-11-30 article mentioned above. That article assumed a room temperature of 20°C; in this one, both the room and outdoor temperatures are the hourly values from the log.

Rearranging the formula gives a sense of how cold it has to be outside for condensation to become possible. For single glazing, U × Rsi = 6.0 × 0.13 = 0.78, so Ts = 0.22 × Ti + 0.78 × To, and the surface temperature is pulled strongly toward the outdoor temperature. For double glazing, 2.9 × 0.13 = 0.377, so Ts = 0.623 × Ti + 0.377 × To.

As an example, take the bedroom medians that appear later (room temperature 18.2°C, dew point 7.232°C) as a single parcel of air. With single glazing, the dew point rises above the surface temperature when the outdoor temperature falls below (7.232 − 0.22 × 18.2) ÷ 0.78 ≈ 4.14°C. With double glazing, that does not happen until the outdoor temperature falls below (7.232 − 0.623 × 18.2) ÷ 0.377 ≈ −10.89°C. This example combines medians and is not the value for any particular room.

For the outdoor temperature we used the weather data included in IDEAL. According to the paper and the overview document, it comes from Weather Underground. The documentation and paper say there are 15-minute values for five locations. We averaged the values for the location listed in each home record over the hour and used that as the outdoor temperature for the hour. The locations are the towns of Edinburgh, Livingston, Penicuik, North Berwick, and Kirkcaldy, not the homes themselves.

The four locations other than Edinburgh have values only from November 27, 2017. If a location had no value for an hour, we excluded that hour from the window calculation rather than substituting another location, so in the 2016–17 winter only homes assigned to the Edinburgh location enter the window calculation. Note that this article shows only aggregated values; we do not reproduce tables of the original 15-minute values.

To make the same comparison in your own room, you need a record of temperature and humidity. A thermometer-hygrometer that keeps its history in a phone app is a simple way to build your own room humidity log.

USD 11.69 on Amazon.com (as of 2026/09/29)

Rooms included in the analysis, and the rows and rooms we excluded

Rooms included in the analysis, and the rows and rooms we excluded

In the IDEAL hourly aggregates, 1,958 rooms and 11,428,499 rows (room × hour) have both temperature and humidity. Of these, 3,107,743 rows fall in winter (December to February). From there we excluded the following.

StepWhat was excludedAfter exclusion
Unusable rows1,520 rows with room temperature at or below 0°C or above 40°C, or relative humidity at or below 0% or above 100%—
Box monitoring an applianceOne box attached to a heating appliance in a living room (the record notes a wood-burning stove) (room 1710)225 homes, 1,721 rooms, 3,104,217 rows
Humidity flag5 rooms with humidityInaccuracy=1—
External windowsRooms with no windows facing outside (externalwindows=0)1,330 rooms
Outdoor temperatureHours with no outdoor temperature (15,384 rows across all 1,721 rooms). For 76 location-hours where the outdoor temperature was below −30°C or above 40°C, or the humidity below 0% or above 100%, the values were set to blank2,389,383 rows in 1,330 rooms
Number of hoursRooms with fewer than 500 valid hours across the two winters combined210 homes, 1,243 rooms

The thresholds for unusable rows (at or below 0°C, above 40°C; at or below 0%, above 100%) are rules we set before running the analysis. The IDEAL paper and documentation say they separately flagged readings with relative humidity below 1% or above 110%, and room temperatures above 60°C, as anomalous. Yet the hourly aggregates we had still contained relative humidity values above 100%. The external criteria and our own rules are different things.

Of the 210 homes in the analysis, 34 contributed values from the 2016–17 winter and 206 from the 2017–18 winter. These add up to more than 210, so some homes are in both winters. We did not use the temperature flag (temperatureInaccuracy) as an exclusion criterion. Nor did we exclude by the share of readings received (the IDEAL reception rate record), so hours with few readings are included as hourly means.

The room type table shows only types with 20 or more qualifying rooms. For types with fewer than 20, we give only the counts: utility rooms 18, combined kitchen and living rooms (kitchenliving) 15, playrooms 11, glass-heavy conservatories 6, and other 2. They are included in the 1,243 rooms.

Median of 43.3% of hours with single glazing, 0% with double glazing

Median of 43.3% of hours with single glazing, 0% with double glazing

For each room we computed the share of valid winter hours that were condensation-prone, then took the median across rooms. This keeps rooms with more data from pulling the result. The percentages in the tables and text are the script output (a ratio from 0 to 1) multiplied by 100 and rounded to one decimal place. The dew point of 7.03°C in the table below is also the output rounded to two decimal places.

Metric (1,243 rooms)Value
Share of condensation-prone hours assuming single glazing (median across rooms)43.3%
Same share assuming double glazing (median across rooms)0%
Rooms with at least one condensation-prone hour, single glazing1,241 rooms
Rooms with at least one condensation-prone hour, double glazing569 rooms
Median dew point (median across rooms of each room median)7.03°C

Data: IDEAL Household Energy Dataset (CC BY 4.0), processed by swiftwand.

If every room is given hypothetical single glazing, the room in the middle when sorted by share has the dew point above the window surface temperature in roughly 40% of winter hours. Only 2 of the 1,243 rooms (1,243 − 1,241) had no condensation-prone hours at all.

Switching to double glazing brings the median across rooms down to 0%. As the formula in the previous section shows, U × Rsi drops from 0.78 to 0.377 and the surface temperature moves closer to the room temperature. Even so, 569 rooms had at least one condensation-prone hour, so in a little under half of the rooms the calculation puts the center of double glazing below the dew point at some point in the winter. A median of 0% does not mean 0 in every room.

Note that this share counts hours in which the calculation puts the center of the glass below the dew point. The edges of double glazing, and frames that pass heat easily such as metal frames, are colder than the center, so with the same log the share for edges and frames could be higher. We come back to this in the section on what this cannot tell you.

By room type, bathrooms and bedrooms are high and studies are low

By room type, bathrooms and bedrooms are high and studies are low

We computed the same values for each room type. The dew point, relative humidity, and room temperature are the median across rooms of each room median.

Room typeRoomsHomesDew point (°C)Relative humidity (%)Room temp. (°C)SingleDouble
Bedroom4932107.23250.618.250.0%0%
Bathroom1911617.63151.918.155.5%2.4%
Living room1891866.71745.918.733.7%0%
Kitchen1671676.87746.918.7538.3%0.1%
Hall89716.56349.318.041.2%0%
Study35356.20148.917.425.2%0%
Dining room27266.01546.518.034.2%0%

Data: IDEAL Household Energy Dataset (CC BY 4.0), processed by swiftwand.

Assuming single glazing, bathrooms have the highest share at 55.5%, followed by bedrooms at 50.0%. Studies are lowest at 25.2%, with living rooms at 33.7% and dining rooms at 34.2%. Of the seven types in the table, only bathrooms (2.4%) and kitchens (0.1%) have a double-glazing median above 0. Bathrooms (7.631°C) and bedrooms (7.232°C) also have the highest median dew points.

Halls have a lower median dew point (6.563°C) than living rooms (6.717°C) yet a higher share (41.2% versus 33.7%). In the calculation, with the same dew point, the colder the room, the colder the window surface, because the coefficient of Ti in the formula from the previous section is positive. The median room temperature was 18.0°C for halls and 18.7°C for living rooms. This is a comparison of medians, though, and we did not follow how the values combine room by room.

A note on the sensor for bathroom values. The SHT21 datasheet gives its accuracy for non-condensing environments and says that long exposure to relative humidity above 80% can temporarily shift readings. The median bathroom humidity was 51.9%, but this analysis did not count how many hours were above 80%.

This data cannot tell us why the room types differ. We did not link the records to lifestyle, room size, or how the heating is used, so this article stops at listing the values by type.

By time of day, hours cluster in the evening from 20:00 to 22:00 and at 08:00 in the morning

By time of day, hours cluster in the evening from 20:00 to 22:00 and at 08:00 in the morning

Next, we computed the single-glazing share for each room and each hour of the day, then took the median across rooms for each hour. Times are UK clock time (the same as UTC in winter) and are the timestamps of the hourly values.

TimeSingleTimeSingleTimeSingle
00:0051.3%08:0057.6%16:0027.1%
01:0050.0%09:0053.5%17:0036.8%
02:0050.0%10:0042.7%18:0046.7%
03:0045.8%11:0033.8%19:0052.9%
04:0044.1%12:0029.5%20:0057.5%
05:0044.3%13:0023.9%21:0058.4%
06:0044.4%14:0023.2%22:0057.4%
07:0050.7%15:0022.7%23:0054.5%

Data: IDEAL Household Energy Dataset (CC BY 4.0), processed by swiftwand.

The highest is 21:00 at 58.4%, with 20:00 (57.5%) and 22:00 (57.4%) close behind. There is a second peak in the morning, with 08:00 at 57.6%. Early afternoon, by contrast, is low, and 15:00 is the lowest at 22.7%. The small hours from 04:00 to 06:00 sit around 44%, dipping slightly between the evening and morning peaks. Assuming double glazing, the median across rooms was 0% at every hour.

So even within the same room, condensation-prone hours were unevenly spread through the day. Splitting a room humidity log by hour and counting brings out this unevenness, which a daily average hides. Whether condensation is possible depends on both the dew point and the window surface temperature, so read the hourly shares as the combined result of the two.

This analysis cannot say why evenings and mornings are higher, however. Both the dew point and the outdoor temperature change with the time of day, and we did not separate how much each contributed. And because we do not know whether the timestamp of an hourly value marks the start or the end of the interval, we cannot say for certain whether it is the 08:00 hour or the 07:00 hour.

The recorded frequency of drying laundry made little difference

The recorded frequency of drying laundry made little difference

The IDEAL room records include how often laundry is dried in the room (never, sometimes, often), recorded at installation. This is a record of frequency, not of when laundry was actually drying. On that basis, we computed the same values for each frequency.

Laundry drying frequencyRoomsHomesDew point (°C)Relative humidity (%)Room temp. (°C)SingleDouble
never8432037.00348.818.443.1%0%
sometimes2641407.11949.8518.143.1%0%
often1361166.95449.0518.0545.5%0%

Data: IDEAL Household Energy Dataset (CC BY 4.0), processed by swiftwand.

The single-glazing share is 43.1% for both never and sometimes, and 45.5% for often, a small difference. The median dew point for often (6.954°C) is slightly lower than for never (7.003°C), and sometimes (7.119°C) is the highest. The ranking is not one where rooms that dry laundry more often have higher dew points.

Broken down by room type, the direction is not consistent. For bedrooms, bathrooms, kitchens, and living rooms, here are the single-glazing share and median dew point by frequency (number of rooms in parentheses).

Room typeneversometimesoften
Bedroom50.9%, 7.302°C (325)46.4%, 7.235°C (121)49.6%, 7.022°C (47)
Bathroom54.7%, 7.656°C (145)57.5%, 7.515°C (26)63.0%, 7.868°C (20)
Kitchen36.9%, 6.788°C (122)49.1%, 7.489°C (16)42.1%, 6.867°C (29)
Living room32.8%, 6.68°C (113)34.3%, 7.091°C (58)28.4%, 6.934°C (18)

Data: IDEAL Household Energy Dataset (CC BY 4.0), processed by swiftwand.

In bathrooms and kitchens the often share is higher than never; in bedrooms and living rooms it is lower. Kitchens with sometimes (16 rooms) and living rooms with often (18 rooms) have fewer than 20 rooms, too few to describe a trend for the type. On top of that, the 136 often rooms consist of 47 bedrooms, 29 kitchens, 20 bathrooms, and 18 living rooms, so their mix of types is not the same as that of the never rooms.

What this analysis can say, then, is only that the share and the median dew point differed little between rooms recorded as often and the others, and that the direction varied by room type. Whether drying laundry increased or reduced condensation cannot be checked, because there is no record of when laundry was drying.

Asking AI to do the same calculation: 7 days in 2 rooms and 3 questions

Asking AI to do the same calculation: 7 days in 2 rooms and 3 questions

From here on, we asked AI to do the same calculation. The material was two rooms selected at random (seed 20261124) from the winter rooms. One is a bedroom where laundry is dried often (room 1746, home 187, with outdoor data from the Livingston location in West Lothian), and the other a living room where it is never dried (room 1477, home 161, with outdoor data from the Edinburgh location).

For both, we used the first 7 days with a complete 168 hours of data. The week starts at 00:00 UTC on a Monday, and for both rooms it came out as the 7 days from December 4, 2017. What we gave the AI was a 168-row table of hourly values with four columns: time, room temperature, relative humidity, and outdoor temperature.

There were three questions, and the answers were to be returned as JSON.

  1. The maximum dew point over the 7 days, and when it occurred
  2. The number of hours in which single glazing (U = 6.0 W/m²K and Rsi = 0.13 m²K/W were written in the prompt) would condense
  3. The hour of the day with the most condensation hours (UK clock time, the same as UTC in winter)

We wrote the prompts in two ways. With formulas, the prompt included the Magnus-type formula and its coefficients and the window surface temperature formula. Without formulas, it included only U, Rsi, and the rule to count an hour as condensing when the dew point is at or above the window surface temperature, without the formulas for the dew point or the surface temperature. For scoring, question 1 checks the dew point and the time separately, so three questions make four items.

ConditionModel and settingsHow the data was given
Paste the tableclaude -p (model ID recorded in the output: claude-sonnet-5-5), no built-in toolsTable pasted into the prompt
Run PythonThe same claude -p, with built-in tools limited to Bash and Read (--tools "Bash,Read"), and only Python and Read allowed to run without confirmation (--allowedTools "Bash(python:*)" Read). Read-only commands such as cat and head can still run without confirmation under this settingThe same table placed as a CSV file in the working folder
Thinking offgemma4:12b (Ollama), thinking off, num_ctx 32768Table pasted into the prompt
Thinking ongemma4:12b, thinking on, num_ctx 32768Table pasted into the prompt
Thinking on (wider context)gemma4:12b, thinking on, num_ctx 65536 (with-formula prompts, both rooms only)Table pasted into the prompt

claude -p is a way of running Claude Code (version 2.1.331 as of 2026-11-24) non-interactively. We specified the model with --model sonnet. We used a minimal setup with no built-in tools (--tools ""), no MCP (an empty --mcp-config plus --strict-mcp-config), and no settings files, and called it from a folder outside the home directory. According to the Anthropic model overview, Claude Sonnet 5.5 has a context window of 1 million tokens and costs $2 for input and $10 for output (per million tokens, as of November 2026).

The local model is gemma4:12b running on Ollama. Gemma 4 12B is a model released by Google DeepMind on 2026-06-03 under the Apache License 2.0 (we only use the weights locally and do not redistribute them). The build we used (digest 6114515d63c1) has 11.9B parameters with Q4_K_M quantization and an 8.0GB download. That is not the VRAM usage. On 2026-11-24 we confirmed the local Ollama client was version 0.40.16, the GPU an RTX 5070 Ti (16,303 MiB VRAM), and we set the temperature to 0.

According to the Ollama documentation, the default context length is 4096 tokens when VRAM is under 24 GiB. So we specified num_ctx (the maximum number of tokens for input and output combined) as 32768. We ran thinking (Ollama think, a setting that outputs a reasoning process before the answer) both on and off. The num_ctx 65536 condition was added after the first run to narrow down the cause, and was not a condition decided before the run.

The correct answers were calculated with pandas, not by AI. The tolerances were ±0.3°C for the dew point and ±1 for the number of hours, with exact matches required for the time and the hour of the day. We set these tolerances ourselves; they are unrelated to the typical temperature accuracy of the SHT21 (0.3°C).

RoomQ1 max dew pointQ1 time (UTC)Q2 condensation-prone hoursQ3 hour with the most
Bedroom (often)13.38°C2017-12-06 22:00120 of 16822:00 (all 7 days)
Living room (never)10.15°C2017-12-06 21:0034 of 16813 hours, 06:00 to 12:00 and 18:00 to 23:00 (2 days each)

Data: IDEAL Household Energy Dataset (CC BY 4.0), processed by swiftwand.

Both the local model and Claude were handed the same table. To understand how open-weight models like gemma4 are run, prompted, and where they break down, this hands-on book is a solid reference.

USD 37.68 on Amazon.com (as of 2026/09/22)

Claude got everything right with both methods; gemma4:12b was wrong or stopped

Claude got everything right with both methods; gemma4:12b was wrong or stopped

Here are the results of the 18 calls. Cost is the total_cost_usd returned by claude -p, rounded to three decimal places; it is a client-side estimate and may differ from the actual bill. The local model has an API cost of 0, and electricity is not included.

RoomConditionFormulasCorrect (of 4)SecondsCost (USD)
BedroomPaste the table (claude -p)Yes472.40.118
BedroomPaste the table (claude -p)No488.90.142
BedroomRun Python (claude -p)Yes47.60.023
BedroomRun Python (claude -p)No425.20.052
BedroomThinking off (gemma4:12b)Yes02.1—
BedroomThinking off (gemma4:12b)No02.0—
BedroomThinking on (gemma4:12b, 32768)YesNo answer162.1—
BedroomThinking on (gemma4:12b, 32768)NoNo answer145.1—
BedroomThinking on (gemma4:12b, 65536)YesNo answer363.2—
Living roomPaste the table (claude -p)Yes495.80.149
Living roomPaste the table (claude -p)No472.80.120
Living roomRun Python (claude -p)Yes47.80.009
Living roomRun Python (claude -p)No417.30.024
Living roomThinking off (gemma4:12b)Yes02.9—
Living roomThinking off (gemma4:12b)No02.2—
Living roomThinking on (gemma4:12b, 32768)YesNo answer152.5—
Living roomThinking on (gemma4:12b, 32768)NoNo answer155.1—
Living roomThinking on (gemma4:12b, 65536)YesNo answer362.4—

Claude got every question right, whether the table was pasted or it ran Python

claude -p kept all four items within tolerance in all 8 runs: 2 rooms × with and without formulas × 2 ways of giving the data. Every number it returned, the maximum dew point, its time, the number of hours, and the hour of the day, matched the correct answer. The result was the same without formulas; in this run it reached the correct answers even when the prompt did not spell out the formulas.

Which formulas and coefficients Claude used in the without-formula condition, however, was not scored. Within the tolerance (±0.3°C for the dew point), slightly different formulas or coefficients would still count as correct.

Having it run Python took less time and cost less

Although every answer was correct either way, the time and cost differed. Pasting the table took 72.4 to 95.8 seconds and $0.118 to $0.149 per run. Having it run Python took only 7.6 to 25.2 seconds and $0.009 to $0.052. Output tokens were also 9,812 to 12,855 when pasting the table and 438 to 2,327 when running Python, and for every combination of room and formulas, the Python runs used fewer.

With Python, the without-formula runs took longer for both rooms (bedroom 7.6 seconds with formulas and 25.2 seconds without; living room 7.8 and 17.3 seconds). With the pasted table, the without-formula run took longer for the bedroom and the with-formula run for the living room (bedroom 72.4 and 88.9 seconds; living room 95.8 and 72.8 seconds). Each was a single run, so the direction of these differences cannot be generalized.

gemma4:12b did not get as far as calculating dew points from the 168-hour table

With thinking off, gemma4:12b returned JSON in the requested format in 2.0 to 2.9 seconds. But in all 4 runs, all 4 items were wrong. Here are its answers next to the correct ones.

RoomAnswer fromMax dew pointIts timeNumber of hoursHour of the day
BedroomCorrect13.38°C2017-12-06 22:0012022:00
BedroomThinking off, with formulas16.34°C2017-12-06 13:001413:00
BedroomThinking off, without formulas16.54°C2017-12-05 13:001413:00
Living roomCorrect10.15°C2017-12-06 21:003413 hours
Living roomThinking off, with formulas14.54°C2017-12-07 03:0048All 24 hours from 00:00 to 23:00
Living roomThinking off, without formulas14.54°C2017-12-07 03:004803:00

In all 4 runs the maximum dew point was higher than the correct value. The number of hours was too low for the bedroom (14 against the correct 120) and too high for the living room (48 against 34). Moreover, the answers were nearly the same whether or not the formulas were written out. For the bedroom, the number of hours and the hour of the day, and for the living room, the dew point, its time, and the number of hours, were identical with and without formulas. This experiment cannot tell us why.

With thinking on, all 4 runs stopped without returning an answer. The finish reason Ollama returned (done_reason) was length in all 4, with output reaching 26,992 to 27,102 tokens. In the bedroom with-formula run, for example, 5,770 input tokens plus 26,997 output tokens makes 32,767, nearly the num_ctx of 32768. These runs took 145.1 to 162.1 seconds.

So for the with-formula prompts in both rooms, we widened num_ctx to 65536 and added one thinking-on run each. Even then, output grew to 59,763 and 59,761 tokens and stopped with length again. In the living room run, 5,775 input tokens plus 59,761 output tokens makes 65,536, exactly the limit. Each run took 362.4 to 363.2 seconds and produced no answer.

In the living room, question 3 had 13 hours tied

Question 3 for the living room had an unusual correct answer. The hours of the day with the most condensation-prone hours were 13 hours, from 06:00 to 12:00 and from 18:00 to 23:00, each on 2 of the 7 days. In scoring, we checked whether the list of hours in the answer matched this set of 13.

claude -p returned all 13 hours in all 4 runs. The thinking-off gemma4:12b, on the other hand, returned all 24 hours from 00:00 to 23:00 with formulas and only 03:00 without, and neither matched the set. Compared with a question like the bedroom one, where the answer is a single hour (22:00, on all 7 days), this question required getting the handling of ties right as well.

If you hand table calculations to AI, check the answers separately

If you hand table calculations to AI, check the answers separately

What this run tells us is limited to tables of one week for two rooms, with each condition run once. Neither Claude Sonnet 5.5 getting everything right nor gemma4:12b getting things wrong is a measure of the models in general. Nor can the number of correct answers be read as a probability of being right.

Still, it showed something to watch for when handing table calculations to AI at home. The thinking-off gemma4:12b put numbers into JSON in the requested format and returned it in 2.0 to 2.9 seconds. The answers were well formed, and the values looked plausible. We only knew they were wrong because we put them next to the correct answers from a script.

In other words, if you hand table calculations to a small local model, you need to check the answers separately. With thinking on it may not reach an answer at all, and in this run it did not even with the context doubled.

For a humidity log, that check takes only a few lines. Written in pandas, the same formulas we used to produce the correct answers look like this. The column names are examples of the column names in the table given to the AI.

import numpy as np
import pandas as pd

df = pd.read_csv("table.csv") # time_utc, indoor_temp_c, indoor_rh_pct, outdoor_temp_c
t, rh, to = df["indoor_temp_c"], df["indoor_rh_pct"], df["outdoor_temp_c"]
ew = 6.112 * np.exp(17.62 * t / (243.12 + t)) # saturation vapor pressure (hPa)
x = np.log(rh / 100 * ew / 6.112)
df["dew_c"] = 243.12 * x / (17.62 - x) # dew point (°C)
df["ts_single"] = t - 6.0 * 0.13 * (t - to) # center-of-glass temperature for single glazing (°C)
df["cond"] = df["dew_c"] >= df["ts_single"] # condensation-prone hours
hour = pd.to_datetime(df["time_utc"]).dt.hour # in a UK winter, UTC is local time

print(df["dew_c"].max(), df.loc[df["dew_c"].idxmax(), "time_utc"])
print(int(df["cond"].sum()))
per_hour = df.groupby(hour)["cond"].sum()
print(per_hour[per_hour == per_hour.max()].index.tolist())

To check the formulas themselves, try computing the dew point for 20°C and 60% relative humidity. The WMO formula gives 12.0°C. To do the same in a Japanese home, keep the time column in Japan time and supply the outdoor temperature column yourself, from the Japan Meteorological Agency or a similar source.

One more thing can be said about how to give the data. In this run, handing over the CSV as a file and having the AI run Python, rather than pasting the table and having it write out the answers, gave the same correct answers in 7.6 to 25.2 seconds at a cost of $0.009 to $0.052. For table calculations, having the AI write and run code is also easier to verify than having it write the answers. For a comparison of ways to give data using power logs, see our article on having AI read per-appliance power logs, and how raw logs, hourly tables, and running code change the accuracy of the answers (published 2026-11-03).

To check an AI answer independently, it is fastest if you can write the same aggregation yourself. This book teaches practical Python, including reading CSV files and automating small data tasks, through worked examples.

Paperback, 3rd edition (No Starch Press, May 2025) on Amazon.com

What this analysis and these runs cannot tell you

What this analysis and these runs cannot tell you
  • We did not measure windows: IDEAL has no record of window glazing, so the calculation applies hypothetical single glazing and hypothetical double glazing to every room. It is not a record of which homes actually had window condensation. We also did not look into how many homes in the UK or Scotland have single glazing
  • Center-of-glass values: the window surface temperature is a one-dimensional, steady-state approximation, calculated as the value at the center of the glass. The edges of double glazing (the perimeter with the spacer) and frames that pass heat easily, such as metal frames, are colder than the center and can condense first. Heavy curtains or furniture by the window make the glass colder still
  • No distinction between water and frost: the test only compares the dew point with the surface temperature, and does not distinguish whether a surface below 0°C would collect water droplets or frost
  • Air at the sensor location: the log comes from boxes placed away from windows, and the air near the windows was not measured. The outdoor temperature is also for the location town, not for the home
  • Hourly means: the dew point was computed from the hourly mean room temperature and humidity. Humidity swings shorter than an hour are smoothed out by the averaging. We also do not know whether the timestamp of an hourly value marks the start or the end of the interval. The outdoor temperature is an hourly mean of 15-minute values grouped by truncating to the hour, so it can be offset from the room values by up to one hour
  • Sensor accuracy: the SHT21 accuracy is the typical value in the manufacturer’s current datasheet (±2 %RH, ±0.3°C), and IDEAL did not verify calibration
  • U-value and Rsi are assumed values: the U-values are center-of-glass reference values from a Japanese Building Research Institute document, and Rsi was checked in a preview of an older ISO edition; they are not the values for actual windows in UK homes
  • These are not Japanese homes: the data comes from homes around Edinburgh, Scotland (mainly with gas central heating), from August 2016 to June 2018, and should not be applied to Japanese housing. The Japanese example was shown as a calculation in the 2026-11-30 article
  • Reasons for the differences: this analysis cannot say why the values differ by room type, time of day, or laundry drying frequency
  • One AI run per condition: these are results for two rooms and one week each, and other rooms, weeks, or questions may not turn out the same

Summary: comparing the dew point with the window surface temperature in a humidity log

Summary: comparing the dew point with the window surface temperature in a humidity log

With a room-by-room humidity log, you can compute the dew point for each hour, compare it with the window surface temperature, and count the hours in which condensation is possible. Doing this with the winter hourly values for 210 homes and 1,243 rooms around Edinburgh, the share of condensation-prone hours with hypothetical single glazing had a median of 43.3% across rooms. With double glazing the median was 0%, yet 569 rooms still had condensation-prone hours at some point in the winter.

By room type, bathrooms (55.5%) and bedrooms (50.0%) were high and studies (25.2%) low. By time of day, using the timestamps of the hourly values, such hours were most common in the evening around 21:00 (58.4%) and in the morning at 08:00 (57.6%), and least common in the early afternoon. Differences by recorded laundry drying frequency were small, and their direction varied by room type.

When we asked AI to do the same calculation on 7 days of data for two rooms, claude -p got every question right with both ways of giving the data in this run. Having it run Python was faster and cheaper. The local gemma4:12b returned wrong answers within seconds with thinking off, and stopped at the context limit with thinking on.

The first thing you can do at home is put a thermometer-hygrometer in a room with windows and keep hourly records of temperature and humidity. Compute the dew point from that room humidity log, calculate the surface temperature with values close to your own window glass and frame, and you will have a rough idea of which hours to watch. If you hand the calculation to AI, check its answers with a few lines of script like the one above before using them.

Sources

Data: IDEAL Household Energy Dataset (Goddard, N.; Kilgour, J.; Pullinger, M. et al., 2021, University of Edinburgh. School of Informatics, Edinburgh DataShare, DOI 10.7488/ds/2836), CC BY 4.0. Data description: Pullinger, M. et al., The IDEAL household energy dataset, electricity, gas, contextual sensor data and survey data for 255 UK homes, Scientific Data 8, 146 (2021), DOI 10.1038/s41597-021-00921-y. Outdoor temperatures are from the weather data included in the same dataset (according to the paper and overview document, sourced from Weather Underground). The tables were made by swiftwand by calculating the dew point and window surface temperature from the hourly aggregates and counting hours.

ブラウザだけでできる本格的なAI画像生成【ConoHa AI Canvas】
ABOUT ME
swiftwand
swiftwand
AIを使って、毎日の生活をもっと快適にするアイデアや将来像を発信しています。 初心者にもわかりやすく、すぐに取り入れられる実践的な情報をお届けします。 Sharing ideas and visions for a better daily life with AI. Practical tips that anyone can start using right away.
記事URLをコピーしました