Developing window behavior models for residential buildings using XGBoost algorithm
Abstract
AI Summary
Brief Overview
In December 2019, Mo, Hao; Sun, Hejiang; Liu, Junjie; and Wei, Shen published the article "Developing window behavior models for residential buildings using XGBoost algorithm" online in ENERGY AND BUILDINGS. The study developed a resident window-opening behavior prediction model based on the XGBoost algorithm, addressing the challenge of the "design–measured performance gap" in building energy consumption simulations caused by unreliable human behavior. By integrating real residential data such as indoor and outdoor temperature and humidity, carbon dioxide concentration, and time, and optimizing feature selection, the model achieved high-precision dynamic predictions of when residents open or close windows. This significantly enhanced the credibility of building energy simulation results, providing a practical new method for the design of smart buildings and low-carbon residences.
Research Abstract
Building operational energy consumption accounts for over 30% of total societal energy consumption. However, the seemingly simple behavior of whether a resident opens a window greatly affects air conditioning loads and indoor air quality. Traditional simulation software often assumes "idealized operation," resulting in design energy consumption that is 20%–40% higher than actual consumption, a phenomenon known as the "performance gap." Previous mainstream approaches used statistical models such as logistic regression to predict window-opening behavior. While structurally simple, these models achieved an average accuracy of only about 60% and struggled to capture the complex decision-making logic of people under different weather conditions, time slots, and indoor environments. This study introduced XGBoost (a machine learning algorithm capable of mining nonlinear patterns) into residential window-opening modeling for the first time. Using 136 days of measured data for model training, the model achieved a prediction accuracy of 81% in independent validation, an improvement of over 20 percentage points compared to traditional methods. These results not only bring building energy consumption simulations closer to real-life conditions but also lay a technical foundation for subsequent modeling of other autonomous behaviors such as air conditioning usage and curtain adjustment.
Background
Accurately predicting residents' window-opening behavior is a key step in improving the reliability of building energy simulations. Its core advantage is that it can significantly reduce the risk of energy estimation errors during the design phase without hardware modifications. It is widely applied in green housing, retrofits of existing buildings, and carbon neutrality planning. However, people are not thermostats—at the same temperature, some open windows due to heat, while others close them to avoid drafts. The choice between morning ventilation and afternoon rain prevention differs substantially. This highly personalized and context-dependent behavior makes it difficult for traditional physical models or simple statistical methods to provide a comprehensive account. Strategy A (such as fixed temperature threshold methods) allows for uniform settings but leads to frequent misjudgments in winter and summer. Strategy B (such as logistic regression) incorporates multiple factors but assumes a linear superposition of variable effects, failing to characterize critical effects where the combined triggers of "high temperature + high humidity + high CO₂" lead to window opening. Consequently, constructing a behavior prediction model that reflects real residential logic while possessing engineering scalability remains a core bottleneck for the practical deployment of smart buildings.
Key Highlights
- Training the computer to recognize human behavior with real-life data: Daily parameters such as temperature, humidity, air quality, and time in real residences were collected to allow the algorithm to autonomously learn patterns from 136 days of resident behavior. This avoids rule-setting based on expert intuition, aligns more closely with the actual habits of thousands of households, and achieves a prediction accuracy of 81%, which is more than 20 percentage points higher than traditional methods, equivalent to being correct in one additional judgment out of every five.
- Looking beyond "heat and cold" to understand "stuffy conditions": The model simultaneously monitors health indicators such as indoor carbon dioxide concentration and PM2.5, effectively functioning as a "breathing sensor" for windows. It can identify behaviors where windows are opened to relieve stuffiness rather than simply to lower the temperature. The model demonstrates particularly stable performance during the transitional spring and autumn seasons.
- Lightweight deployment compatible with existing design tools: The model is small in size and fast in computation, allowing it to be directly embedded in mainstream building simulation software (such as EnergyPlus) without additional sensors or network upgrades. It is analogous to upgrading the smart chip in an old calculator, promoting industry upgrading at low cost.
Summary and Outlook
Based on XGBoost machine learning technology, this study excavated the nonlinear correlation mechanism between multi-source environmental parameters and window-opening behavior, achieving high-robustness prediction of residential dynamic window-opening behavior. The technology possesses the dual advantages of high accuracy (81%) and strong generalizability (applicability across climate zones). The results show that in spring and autumn transitional seasons, an F1-score of 0.81 was obtained, and in naturally ventilated southern residences, an overall state accuracy of 82.6% was achieved. This study not only resolves the long-standing industry issue of "behavioral distortion" in building energy simulations but, through the methodological innovation of "data-driven behavior modeling," provides a transferable technical paradigm for the intelligent control of HVAC systems, low-carbon renovation of old residential communities, and carbon emission inference for city-scale building clusters. The research team is currently extending the work to modeling the coordinated control of air conditioning start/stop and shading, with future potential to support millions of households in achieving a new vision of smart living characterized by on-demand energy supply and comfort-oriented carbon reduction.

