Next Article in Journal
Predictive Monitoring of Wage-Band Classification in GOSI Data with Leakage Control and Out-of-Time Validation
Previous Article in Journal
Assessing Historical and Simulating Future Land-Use and Land-Cover Change Through an Integrated Cellular Automata and Machine-Learning Framework in Urbanizing Areas
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Impact of Occupancy Dynamics on Indoor CO2 Forecasting: A Cross-Scenario Evaluation

1
Institute of Smart Cities (ISC), Public University of Navarra (UPNA), Campus de Arrosadia, 31006 Pamplona, Spain
2
inBiot Monitoring, P.º Santxiki, 2 LB5, 31192 Aranguren, Spain
*
Author to whom correspondence should be addressed.
Forecasting 2026, 8(2), 26; https://doi.org/10.3390/forecast8020026
Submission received: 2 February 2026 / Revised: 5 March 2026 / Accepted: 20 March 2026 / Published: 24 March 2026
(This article belongs to the Section AI Forecasting)

Highlights

What are the main findings?
  • Baseline models perform best at short prediction horizons (10 min), whereas ensembles and fine-tuned foundation models are most reliable at 2–4 h; overall, performance varies by use case and horizon, with no universally best CO2 forecaster.
  • Zero-Shot Foundation Models can surpass trained classical models when local data are limited, indicating context-robust performance without site-specific training.
What are the implications of the main findings?
  • Forecasting performance is strongly context- and horizon-dependent: model choice should be tailored to the occupancy/ventilation dynamics of each indoor setting rather than assuming a universal solution.
  • Foundation Models enable scalable deployment for predictive IAQ control in data-scarce buildings, reducing the need for extensive historical data collection before obtaining useful forecasts.

Abstract

Indoor CO2 forecasting supports proactive ventilation control that balances air quality with energy efficiency. While Machine Learning (ML) models have shown strong performance in controlled settings such as schools, their generalization across indoor spaces with diverse occupancy dynamics remains poorly characterized. We present a systematic benchmark of 11 forecasting models spanning simple baselines, statistical methods, classical ML, deep learning, ensembles, and foundation models using 18 weeks of IoT sensor data spanning six real-world use cases: conference rooms, dining halls, hospitals, food markets, offices and student residences. Performance depends strongly on the prediction horizon and on the regularity of occupancy-driven CO2 patterns. Simple baselines tend to perform best at short horizons (10 min ahead), while ensembles and fine-tuned foundation models provide more robust accuracy at longer horizons (4 h ahead). Remarkably, zero-shot foundation models demonstrate the ability to outperform trained classical models in data-scarce scenarios, challenging the traditional paradigm of localized training. These findings indicate that optimal forecasting strategies are context-dependent and challenge the assumption of universal model superiority.

1. Introduction

Indoor Air Quality (IAQ) is a growing priority in public health and building management because people spend most of their time indoors [1]. Effective methods to assess and manage indoor pollution are therefore required, particularly in public or high-occupancy environments where repeated exposure may increase health risks [2]. In recent years, the combination of IoT technologies for continuous monitoring and advances in Artificial Intelligence (AI) has enabled more proactive IAQ management strategies [3,4].
Among IAQ parameters, CO2 is widely used as a proxy for ventilation and occupancy levels [5,6,7]. A large share of IAQ studies monitor CO2, and a substantial subset explicitly targets it for forecasting [4,8]. Forecasting is especially relevant when the goal is not only to characterize current conditions but also to anticipate future states to trigger preventive actions with sufficient lead time [4]. In this context, forecasting models can reduce the risk associated with high CO2 episodes by anticipating upward trends and enabling earlier, more efficient ventilation control, thus avoiding peaks that are often not mitigated through manual operation. Predictive control can also help balance air quality, occupant comfort, and energy consumption [9,10,11].
As a result, the literature has increasingly explored computational approaches to forecast indoor CO2 concentrations. Prior work spans a broad range of modeling families. Early and operationally oriented studies often rely on statistical time-series models (e.g., ARIMA) or linear baselines, while a growing body of work applies classical ML approaches (e.g., tree-based ensembles) to capture nonlinear relationships in historical CO2 dynamics [4,10,12]. More recently, deep learning architectures (e.g., recurrent and convolutional temporal models) have been explored for multi-step forecasting and for learning complex occupancy-driven patterns [4,9]. Across studies, modeling setups vary widely (e.g., univariate vs. multivariate inputs including occupancy or environmental covariates), datasets are often context-specific, and evaluation protocols differ substantially, which complicates cross-study comparisons and limits general conclusions [13,14].
Despite this progress, the literature still shows limitations that hinder robustness and generalization in real deployments. First, many studies remain restricted to single buildings or narrow contexts and short observation periods, limiting external validity [13,15]. Second, evaluation is often not systematic across operationally relevant horizons, even though the value of forecasts depends on the available lead time [13]. Third, reporting and benchmarking are inconsistent, and strong simple baselines are sometimes omitted despite being competitive at short horizons [15].
Building on this landscape, in a previous work focused on educational settings [16], we analyzed CO2 forecasting in schools by comparing multiple forecasting techniques across several prediction horizons. That study established a reproducible methodology and showed that simple models performed best for short-term CO2 forecasting (10 min ahead), whereas ML models achieved higher accuracy as the horizon increased, providing actionable lead time to anticipate CO2 build-up and support timely ventilation actions to keep classrooms within safe levels.
However, indoor CO2 dynamics depend strongly on context [17], which raises the question of whether these findings generalize beyond classrooms. Patterns vary with the type and purpose of the space (use case), the intensity and temporal structure of occupancy, and operational factors such as ventilation strategies. In addition, CO2 generation is influenced by occupant characteristics (e.g., age, weight, or activity level) [18], introducing heterogeneity even within the same type of environment [9]. This variability limits the extent to which results obtained in a single scenario can be extrapolated to other indoor contexts.
Against this background, this paper evaluates whether the findings previously obtained in schools [16] generalize across other use cases with different spaces, occupancy patterns, and CO2 dynamics. To do so, we benchmark 11 forecasting models spanning simple baselines, statistical methods, classical ML, deep learning, ensembles, and time-series foundation models under a shared protocol and analyze performance across different prediction horizons. Using univariate CO2 measurements collected at 10 min resolution over 18 consecutive weeks from 16 deployed indoor locations across six real-world use cases in Europe (This study was conducted within the framework of the European project K-HEALTHinAIR (Knowledge for improving indoor air quality and health) [19], which aims to generate evidence and technological solutions to improve IAQ and its health impact through large-scale monitoring, data integration, and advanced analytics in real-world environments). By evaluating four decision-relevant horizons (10 min, 1 h, 2 h, and 4 h) with time-series-aware validation to avoid temporal biases, we test the following claims: (H1) the best-performing model family depends jointly on forecasting horizon and use-case context; (H2) findings derived from a single scenario (e.g., classrooms) are not necessarily robust when evaluated in other indoor contexts with different occupancy-driven dynamics; and (H3) modern time-series foundation models can be competitive for indoor CO2 forecasting under the above operating conditions. These results provide practical model-selection guidance conditioned on context and lead time.
This work addresses key gaps directly by providing:
  • Cross-context evidence: Evaluation across six real-world use cases with heterogeneous occupancy dynamics.
  • Systematic horizon analysis: Consistent benchmarking at four operational horizons (10 min–4 h).
  • Time-series-aware validation: TS-specific evaluation and statistical tests to support robust comparisons.
  • Reproducible broad benchmark: 11 models from baselines to foundation models under a shared protocol.
The article is structured as follows: Section 2 describes the devices, use cases, and the data collection and selection procedure. Section 3 details the methodological and experimental framework. Section 4 shows the results obtained in the study. Section 5 discusses the main findings and implications, and Section 6 presents the conclusions and future lines of work.

2. Data Collection and Analysis

This section describes the datasets and the data curation steps that underpin the subsequent modeling and numerical experiments. CO2 data were collected from various indoor environments representing different usage scenarios. Section 2.1 describes the devices employed for CO2 data collection. Section 2.2 provides an overview of the device deployment, data collection periods, and selection criteria used to select the data subsets. Finally, Section 2.3 offers a more detailed analysis focused on individual use cases and their specific characteristics.

2.1. Devices

The data used in this study were collected using IoT-based IAQ monitoring devices known as MICAs. These devices are manufactured and commercialized by InBiot Monitoring SL, a company specialising in IAQ solutions (www.inbiot.es, accessed on 12 June 2025). MICA devices incorporate low-cost sensors capable of real-time measurement of various indoor air pollutants. In this study, only CO2 measurements were considered. The CO2 sensor is based on non-dispersive infrared (NDIR) technology, with a measurement range of 400–10,000 ppm and an accuracy of ± ( 30 + 3 % m . v . ) ppm.
All devices were tested and calibrated in the laboratory prior to deployment, following established quality control protocols to ensure reliable sensor performance and consistent data transmission. Additionally, the MICA device is certified by the RESET standard [20], complying with its requirements for measurement precision and resolution.

2.2. Global Analysis and Use Case Specification

A total of 16 MICA devices (Section 2.1) were deployed across six representative indoor environments, each characterized by distinct occupancy patterns and usage dynamics: Conference Room (CONFROOM), Dining Hall (DININGHALL), Hospital (HOSPITAL), Food Market (MARKET), Office (OFFICE), and Student Residence (RESIDENCE). Throughout this article, each use case is referred to using a short identifier (e.g., CONFROOM for Conference Room). The CONFROOM, DININGHALL, and RESIDENCE use cases were located in Agder, a county in southern Norway (58°27 N, 7°53 E), while HOSPITAL, MARKET, and OFFICE were situated in Barcelona, the capital of Catalonia in eastern Spain (41°23 N, 2°11 E). The distribution of devices among the use cases was as follows: 2 devices in CONFROOM, 3 in DININGHALL, 3 in HOSPITAL, 2 in MARKET, 3 in OFFICE, and 3 in RESIDENCE.
Data collection took place between 2023 and 2025. However, the amount of available data varies by device and use case due to differences in installation dates and occasional transmission interruptions. Therefore, to ensure consistency throughout the study, a fixed subset of 18 consecutive weeks of CO2 concentration measurements was selected for each device based on the following criteria:
  • Since the measurements were carried out in real environments using low-cost IoT devices, missing values and data gaps were common. Subsets with minimal proportions of missing data were prioritized.
  • The duration of available data varies between use cases. To ensure a homogeneous and temporally aligned comparison, a uniform duration of 18 weeks was selected for all devices.
  • The sampling interval is user-configurable and varied across deployments, ranging from 5 to 15 min. To standardize the datasets, a fixed interval of 10 min was applied. Downsampling was used for devices with higher sampling frequencies (intervals < 10 min), while linear interpolation was applied to series with lower frequencies and to fill missing values. As a result, each device contains 18,144 CO2 measurements, yielding a total of 290,304 observations used in this study.
Finally, Figure 1 shows a visual summary of the total data collection period for each device. The selected 18-week subset used in this study is highlighted in a darker segment.

2.3. Data Analysis

The study considered six representative indoor environments, each selected to capture distinct occupancy patterns and dynamic behaviors associated with CO2 concentrations. These variations are fundamental for assessing whether predictive models can generalize across different environments. A detailed description of each use case is provided below:
  • Conference Room (CONFROOM): Conference rooms are characterized by long periods of inactivity punctuated by short but intense occupancy during scheduled meetings or events. This typically results in rapid and pronounced increases in CO2 concentration during occupancy, followed by abrupt declines once the room is vacated or when the ventilation system effectively removes the accumulated CO2.
  • Dining Hall (DININGHALL): Dining halls are defined by periodic and recurring occupancy peaks, generally aligned with meal times. These peaks occur at relatively predictable times of day, but their magnitude and duration vary depending on the number of users and the day of the week. This yields a partially regular pattern (owing to its daily rhythm) that nevertheless contains variability and occasional unexpected surges.
  • Hospital (HOSPITAL): Hospitals are characterized by continuous occupancy because patients are present 24 h a day and healthcare staff are constantly active. This uninterrupted human presence leads to CO2 levels that remain persistently elevated throughout the day. In these environments, ventilation is typically mechanically controlled to maintain health and safety standards, which generally results in smoother concentration curves than in other use cases. In the specific hospital considered for this study, concentrations increased during the night-time period due to a lower ventilation rate, whereas levels decreased during the day thanks to more intensive ventilation. This pattern represents a different dynamic compared to the one observed in most other environments.
  • Food Market (MARKET): Food markets are characterized by heterogeneous and irregular occupancy, strongly influenced by external factors such as opening hours, day of the week, seasonal variations throughout the year, and even weather conditions that affect customer flow. CO2 levels may remain close to baseline values for long periods and then rise sharply with the sudden arrival of visitors. Although recurrent increases around midday and a notable rise on Saturdays can be identified in the analyzed data, the magnitude and regularity of these peaks vary considerably, reflecting the unpredictable nature of the environment.
  • Office (OFFICE): Offices typically follow occupancy cycles linked to working hours. Activity is concentrated mainly on weekdays, with a lower presence in the evenings and at weekends. Within the working day, however, fluctuations occur due to breaks, meetings, or hybrid working arrangements that alter the expected trends. This intermediate scenario combines regular daily cycles with occasional variability, constituting a use case with moderately stable but non-continuous dynamics.
  • Student Residence (RESIDENCE): Student residences are characterized by prolonged occupancy with gradual and less structured dynamics. Residents typically spend long periods in their rooms, alternating between studying, leisure, and rest. Ventilation habits are irregular, depending on window opening or the use of mechanical systems, which often leads to a gradual accumulation of CO2 over time. Unlike spaces with abrupt peaks (such as conference rooms), student residences exhibit slower yet persistent variations.
To examine CO2 temporal patterns (as occupancy proxies) in greater detail, Figure 2 presents weekly heatmaps of CO2 concentration for each use case. These visualizations depict the mean concentration computed across all devices associated with the same environment, aggregated by hour of the day and day of the week over the full 18-week period. Each matrix shows the hours of the day on the vertical axis and the days of the week on the horizontal axis, with a color scale indicating CO2 concentration in ppm. This representation facilitates the identification of recurrent occupancy-related patterns based on the typical accumulation of CO2 associated with human presence.
Table 1 presents the basic descriptive statistics that quantify the observed patterns. In most use cases, the mean CO2 concentration is close to the traditional baseline level of an unoccupied space (400 ppm [6]), which is consistent with a low occupancy frequency. In contrast, HOSPITAL exhibits the opposite pattern, with substantially higher mean values over time, which supports its condition of continuous occupancy. The standard deviation provides additional insight: high values alongside means close to the baseline level, as in CONFROOM, DININGHALL and RESIDENCE, suggest sporadic but significant occupancy events, whereas OFFICE shows lower variability, consistent with its more stable daily cycles.
Overall, these observations highlight how CO2 concentrations depend on the type of space and its occupancy patterns. This relationship motivates the use-case-based analysis adopted in this work and provides the methodological basis for the forecasting approaches evaluated in the subsequent experimental section. However, because occupancy and ventilation control actions are not directly observed, these patterns should be interpreted as CO2-based proxies rather than ground-truth measurements of the underlying drivers.

3. Materials and Methods

As reported in the literature, the use of ML models can improve the forecasting of CO2 levels compared with simpler approaches in certain specific contexts, such as schools [16]. However, this section aims to address the stated objective: are ML models useful across multiple scenarios with different occupancy patterns?
As described in the previous Section 2, this study considers six scenarios (CONFROOM, DININGHALL, HOSPITAL, MARKET, OFFICE and RESIDENCE), with a total of 16 deployed devices. For each device, a dataset corresponding to 18 consecutive weeks of CO2 measurements is available, sampled at 10 min intervals, resulting in 18,144 records per device (290,304 observations in total).
In order to have a global view of the experiment performed, the pipeline applied in this study is as follows: (i) CO2 data are measured using the deployed devices; (ii) for each device, an 18-week consecutive subset is selected according to the criteria defined in Section 2.2; (iii) all selected series are homogenized with a uniform 10 min sampling interval and consistent missing-data handling; (iv) temporal validation is applied independently to each device using Rolling-CV (detailed in Section 3.4).
In each device we apply Rolling-CV to have multiple temporal folds, and each fold is split into training and validation subsets. In each fold, models are trained on the corresponding training subset and evaluated on the associated validation subset for that horizon. This produces one performance value per fold; the global performance of a model on a given device is computed as the arithmetic mean across folds.
Finally, for each prediction horizon, use-case-level performance is obtained by aggregating the device-level results of all devices belonging to the same use case. Therefore, comparative results are consistently reported by model, device, use case, and prediction horizon. Figure 3 summarizes this methodological workflow.

3.1. Forecasting Models

We selected eleven forecasting models representing three common methodological approaches in TS forecasting: simple models, statistical models, and ML-based models. This selection covers widely used techniques in the literature and enables the comparison of approaches with different levels of complexity under a common experimental framework.
The simple-model block includes low-computational-cost methods that serve as reference baselines. The statistical-model block comprises classical approaches based on the intrinsic properties of the TS, exploiting patterns such as autocorrelation, seasonality, and trend. Finally, the ML block group methods learn patterns directly from data without explicitly imposing a parametric structure on the series, allowing them to capture complex and non-linear relationships. The models considered are described below.

3.1.1. Simple Models

  • Shifted model (SH): performs a constant shift of the TS itself as the forecast. The shift is determined by the prediction horizon under analysis.
  • Moving Average model (MA): uses a moving average of the last N CO2 values as the forecast. In this study, a 1 h window (6 measurements) is used to compute the average.

3.1.2. Statistical Models

  • Autoregressive Integrated Moving Average model (ARIMA) [21]: a model widely used in the literature. We used an autoARIMA implementation provided by the DARTS library [22] to estimate the parameters.

3.1.3. ML-Based Models

Within this framework, four model categories were considered: classical ML, deep learning (DL) architectures, ensembles, and foundation models.
Classical ML Models
This category includes well-established learning algorithms widely used in general ML and common in pollutant forecasting literature, where they have demonstrated strong performance in TS prediction [8]. The models selected were:
  • Random Forest (RF) [23].
  • XGBoost (XGB) [24].
DL Models
This group comprises neural architectures designed to capture non-linear and temporal relationships by leveraging established DL designs for sequence modeling. The models selected were:
  • Neural Hierarchical Interpolation for TS Forecasting (N-HiTS) [25].
  • Temporal Convolutional Network (TCN) [26].
  • Transformer (TRF) [27].
Ensembles
This category combines forecasts from multiple models to leverage complementary strengths and improve forecasting accuracy in TS prediction [28,29].
  • Ensemble (ENS): combines the outputs of RF, N-HiTS, and TCN using the arithmetic mean to produce the final forecast.
Foundation Models
This category includes models from the Chronos family [30,31], which are TS foundation models that reuse language-model architectures (T5) but are pretrained on numerical TS, not on natural-language text. Chronos converts a real-valued series into discrete tokens via per-window scaling and quantization, so forecasting becomes next-token prediction optimized with cross-entropy. The models are pretrained on a large and diverse corpus of publicly available real-world TS datasets, complemented with synthetic series generated via Gaussian processes to broaden the range of trends/seasonalities and improve zero-shot generalization. This combination (tokenization + probabilistic next-token modeling + large multi-domain pretraining) largely explains the strong performance observed even without task-specific training. Two Chronos models integrated into AutoGluon [32] were evaluated:
  • Chronos-T5 Tiny zero-shot (LLM-ZS): Deployed in a strict zero-shot setting. This model generates forecasts relying exclusively on its pre-trained general knowledge, without being exposed to the training partition of the specific target buildings.
  • Chronos-T5 Tiny fine-tuned (LLM-FT): Extends the pre-trained base model by incorporating a fine-tuning stage on the specific historical data of the target buildings, allowing the model to adapt its weights to the particular dynamics of each use case.
A general configuration was employed across model training, consisting of a window size of 144, 200 training epochs, a batch size of 256, and a learning rate of 10 3 using the Adam optimizer with a dropout probability of 0.1 . No hyperparameter tuning was performed. For Classical ML and DL models, normalization of the input values to the interval [ 0 ,   1 ] was applied as a preprocessing step. The model-specific configurations are summarized in Table 2.

3.2. Prediction Horizons

In the TS forecasting literature, it has been observed that, particularly for short-term prediction tasks, simple models with low computational cost can outperform more complex alternatives [33,34]. This phenomenon remains an open question in the field, highlighting the importance of understanding model behavior across different forecast horizons. As the prediction horizon increases, the problem becomes more complex to model.
In this context, it is relevant to explore whether simple models can still provide accurate forecasts of CO2 levels as the horizon extends and whether they may even outperform more sophisticated approaches under certain conditions.
To address this, the present study evaluates model performance across multiple forecast horizons, examining CO2 predictions at varying temporal distances. Specifically, the following horizons are considered throughout the experimental setup: t = 1 (10 min ahead), t = 6 (1 h), t = 12 (2 h), and t = 24 (4 h).

3.3. Input Configuration and Sliding Window Strategy

We adopt a single data formation strategy to compare the 11 models on equal terms. Forecasting is univariate: only historical CO2 observations are used as input, with no auxiliary covariates or future information. All series are resampled to a uniform 10 min interval (Section 2.2), so the temporal resolution is consistent across use cases and models.
Input Vector Construction: The input for each model consists of a fixed look-back window of L = 144 historical observations. Given the 10 min resolution, this window represents the preceding 24 h of CO2 dynamics. At time index i, the input vector is defined as X i = [ x i L + 1 , , x i ] , where x i denotes the CO2 concentration at i. For a given forecasting horizon t, the associated target value is x i + t . This configuration is illustrated in Figure 4 for the case t = 6 (1 h ahead). The same window length is used for all models, including foundation models, where it corresponds to the input context length.
Sliding Window Procedure: For each device, a sliding window iterates across the time series to generate the full dataset (Figure 5). At each time index i, a new input-target pair ( X i , x i + t ) is constructed. The window advances by one time index (10 min) at each iteration, producing a new sample until the end of the available data.
Forecasting Strategy: A direct forecasting approach is adopted. Instead of recursive multi-step prediction, a separate model instance is trained for each target horizon t { 1 ,   6 ,   12 ,   24 } defined in Section 3.2. Each model learns to map the input vector X i to its corresponding target x i + t for the specific horizon under analysis.

3.4. Validation

In this study, the Rolling-CV temporal cross-validation technique [35] was used in TS problems to generate multiple training and test splits. Its purpose is to evaluate the model across different time periods and to avoid dependence on a single test interval.
Rolling-CV was applied independently to each device using an overlapping variant in which the validation set from each iteration is subsequently incorporated into the training set. From the complete dataset of measurements for each device, multiple temporal subsets (folds) were generated, maintaining a fixed proportion of 80% of the data for training and the remaining 20% for validation in each split.
Given that an 18-week consecutive dataset is available for each device, a total of 14 folds were generated per device. Each fold follows a five-week configuration, in which the first four weeks are used for training and the fifth week for validation. Figure 6 shows an illustrative scheme of the first three folds generated under this configuration.

3.5. Error Metrics

In IAQ-related forecasting problems, the most commonly used metrics in the literature are RMSE (Root Mean Squared Error), followed by R2 (coefficient of determination), MAPE (Mean Absolute Percentage Error), MAE (Mean Absolute Error), and MSE (Mean Squared Error). However, metrics such as RMSE, MAE, and MSE, despite being traditional measures widely used in ML, are scale-dependent. This hinders the comparison of model performance when models are trained on datasets of different magnitudes [8], representing a significant challenge when comparing models across datasets with different scales. Therefore, it is recommended to select non-scale-dependent metrics for model comparison [4]. Given that CO2 levels and data scales in this study vary depending on the use case, we selected two complementary metrics based on MAE but measuring different aspects of model performance: MAPE and MAE Ratio .
MAPE [36] measures the percentage error of predictions. Given two TS, it is defined as
MAPE ( y , y ^ ) = 100 N i = 1 N | y i y ^ i y i | ,
where y i and y ^ i denote the observed and predicted values at time step i, respectively, and N is the number of observations.
The MAE Ratio quantifies the relative improvement of the proposed models with respect to a reference baseline model, which, in this study, is the Shift model (SH). It is defined as
MAE Ratio ( m , t ) = MAE m , t MAE ref , t ,
where MAE m , t and MAE ref , t represent the MAE [37] of the evaluated model and the reference model, respectively, calculated as
MAE ( y , y ^ ) = 1 N i = 1 N y i y ^ i .
In this context, an MAE Ratio <   1 indicates that the proposed model outperforms the SH model (achieving higher accuracy), whereas a value >   1 implies inferior performance.
To evaluate the overall performance, we followed a two-step aggregation process. First, the performance of a model for a specific device is calculated by averaging the results obtained across the 14 folds. Then, the performance of a model for a given use case is determined by the arithmetic mean of the performance of all devices belonging to that use case. This methodology provides a global performance measure for each use case, model, and prediction horizon.

Implementation Tools

The implementation and training of the models were conducted using two different hardware configurations. One setup featured an Apple M3 processor and 16 GB of RAM (Apple Inc., Cupertino, CA, USA). The second configuration included an Intel Core i5-11400 processor running at 2.60 GHz (Intel Corporation, Santa Clara, CA, USA), along with an NVIDIA GeForce GTX 3060 graphics processing unit (GPU) with 12 GB of memory (NVIDIA Corporation, Santa Clara, CA, USA). Python version 3.7 was used throughout the study, in combination with the DARTS library (Data Analytics and Reporting Toolkit for TS) [22], version 0.27.2, as the primary tool for TS analysis and modeling.
As the use of GPU-based training can introduce non-deterministic variability in the initialization of model weights—potentially affecting result stability—the training procedure was replicated on both systems. The performance metrics reported in this study correspond to the average values obtained across both environments in order to enhance the robustness and representativeness of the analysis.

4. Experimental Results

After completing the experimental process across the sixteen devices included in this study, the results for the proposed models (SH, MA, ARIMA, RF, XGB, N-HiTS, TCN, TRF, ENS, LLM-ZS, LLM-FT) were obtained for each use case described in Section 2. Table 3 presents the overall MAPE values for each use case in the evaluated prediction horizons ( t = 1 , t = 6 , t = 12 and t = 24 ), averaged across devices. For completeness, per-device MAPE values and standard deviation across validation folds are reported in Table A3 and Table A4.
The analysis of Table 3 reveals a significant disparity in prediction difficulty across use cases, with the HOSPITAL scenario exhibiting the highest systematic error. While in environments such as the RESIDENCE or OFFICE, long-term MAPE values ( t = 24 ) remain notably low (ranging between 3% and 4.5%), in the HOSPITAL, the error surges above 28%.
Across prediction horizons, a consistent pattern is observed: SH and ARIMA dominate at short horizons, whereas their error increases more sharply as the horizon extends. At t = 1 , SH and ARIMA almost always achieve the best results (bolded in Table 3). By contrast, at t = 24 their MAPE increases substantially relative to other approaches. At longer horizons ( t = 12 and t = 24 ), ENS and LLM-FT emerge as the most robust solutions across several use cases. In scenarios such as the DININGHALL, MARKET, and OFFICE, ENS consistently minimizes error at these horizons, while Classical ML (RF and XGB) and DL models tend to present slightly higher errors.
Regarding foundation models, a clear performance gap is observed between LLM-ZS and LLM-FT across multiple scenarios and horizons. Nevertheless, LLM-ZS outperforms Classical ML and DL models (e.g., RF, XGB, and N-HiTS) in several cases. For instance, in CONFROOM and RESIDENCE, zero-shot yields lower error than some trained architectures.
To quantify the extent to which ML models improve or degrade relative to the simplest baseline (SH), we computed the MAE Ratio in Table A2 (from MAE values in Table A1). Figure 7 presents a heatmap where green shades indicate improvement over SH and red shades indicate degradation. Figure 8 shows the evolution of MAE Ratio across horizons for each use case, with a horizontal threshold at MAE Ratio = 1 .
Both figures indicate that, at short horizons, improvements over SH are limited: many complex architectures have MAE Ratio > 1 at t = 1 . As the horizon increases, MAE Ratio decreases in most use cases, and at t = 12 and t = 24 , ENS and LLM-FT frequently fall below the unit threshold. This trend is less pronounced in CONFROOM and RESIDENCE, where SH remains competitive across most horizons.
These results suggest that the HOSPITAL’s temporal dynamics are more challenging for all algorithm categories, potentially due to the continuous-occupancy regime. The short-horizon dominance of SH and ARIMA is consistent with strong short-term autocorrelation in indoor CO2, where concentrations typically evolve gradually. Conversely, the longer-horizon advantage of ENS and LLM-FT indicates that approaches capable of capturing broader temporal structure become more beneficial as persistence weakens.
For the foundation models, the observed gap between LLM-ZS and LLM-FT supports the role of fine-tuning for capturing building-specific dynamics, especially in complex scenarios and longer horizons, as also reported in [31]. At the same time, the competitive performance of LLM-ZS in selected scenarios suggests that pretrained temporal representations can be strong even without exposure to target-building training data.

Statistical Test

In order to evaluate the statistical significance of performance differences among models, a hierarchical statistical evaluation was adopted across the sixteen devices at each horizon, inspired by the methodology described in [38]. In this analysis, each device constitutes one observational unit (block) using the per-device mean error average across the 14 rolling-CV folds. Folds are not treated as independent observations due to temporal overlap; comparisons are therefore paired at the device level. As illustrated in Figure 9, this evaluation is structured as a multi-step tournament designed to identify the most robust forecasting approach. The process began by categorizing models into five distinct families (baselines, statistical methods, classical ML models, DL architectures, and LLMs) and performing an intra-family comparison to select the best representative for each group. Subsequently, the winners of the learning-based families were compared to determine the superior “Best ML” approach. In the final stage, this top ML model was compared against the best baseline and the best statistical method to determine the global winner.
Regarding the statistical tools employed to execute this protocol, different non-parametric tests were applied depending on the comparison type. When comparing a group of methods (more than two), the Aligned-Friedman test [39] was used, followed by Holm’s post hoc test [40] to identify significant differences. Conversely, for pairwise comparisons, the Wilcoxon signed-rank test [41] was employed. Adjusted p-values ( α = 0.05 ) were used to determine whether to reject the null hypothesis of equivalence between methods. Note that regarding the interpretation of results, lower ranks imply better performance for Friedman, while higher rank sums indicate superiority for Wilcoxon. This statistical protocol is widely recommended for ML model comparisons in the literature [16,42,43,44,45].
Based on the results shown in Figure 9, a clear transition is observed regarding the prediction horizon. At the shortest horizon ( t = 1 ), baseline models, specifically SH, demonstrate statistical superiority, outperforming more complex architectures in the final comparison. However, as the horizon extends, the trend reverses: the “Best ML” branch consistently prevails over the “Baselines” branch. This statistical validation confirms the findings from the MAPE analysis, proving that while simple heuristics suffice for immediate next-step predictions, learning-based approaches are statistically superior for capturing longer-term dependencies.
Nevertheless, the fact that a specific model wins the final round of the hierarchical test does not necessarily imply it is strictly superior to every other model in its category, but rather that its family performs better on average. To address this, we conducted an auxiliary analysis to determine if the top-performing model is statistically distinguishable from the remaining architectures in the family. Only the cases where an ML model emerged as the winner ( t = 12 and t = 24 ) are considered, because SH ( t = 1 ) was already compared against MA, and ARIMA does not have any other method in its family. Table 4 presents the results of the Wilcoxon signed-rank test, comparing the “Best ML” model (Control) against the other candidates.
As shown in Table 4, ENS demonstrates a statistically significant advantage over individual architectures in most pairwise comparisons. A notable exception, however, is observed in the comparison with LLM-FT. Across both horizons, we fail to reject the hypothesis of equivalence, indicating a lack of statistical evidence for ENS’s superiority over LLM-FT. These results underscore the competitiveness of the LLM-FT approach, which effectively matches the performance of top-tier ensemble strategies in challenging long-term scenarios.
Finally, it is important to interpret these statistical results as a global assessment of performance consistency rather than a universal verdict. While the hierarchical tests identify the models that are most robust on average across the entire dataset, the detailed analysis in Section 4 revealed that the optimal forecasting strategy is highly dependent on the specific use case. Consequently, the statistical superiority reported in this section reflects the generalizability of the models across diverse conditions, but it does not preclude that, in specific environments, alternative architectures may yield better results depending on local dynamics.

5. Discussion

The analysis of the results across six heterogeneous use cases reveals that there is no universal prediction strategy for forecasting CO2 indoors. Unlike controlled environments, contextual variability dictates model performance, leading to several critical findings that qualify and expand upon previous literature.
A clear dichotomy is observed based on the structure of occupancy. In spaces with unstructured and sporadic occupancy (CONFROOM, RESIDENCE), CO2 levels remain close to the baseline (400 ppm) for long periods. In these scenarios, deploying complex DL models represents an inefficient use of computational resources; the SH model is not only competitive but also frequently outperforms deep architectures in short horizons. Conversely, in cyclic scenarios (OFFICE, DININGHALL, MARKET), the temporal structure is rich enough for ML models—specifically ENS and LLM-FT—to statistically outperform baselines in the long term ( t = 24 ), capturing weekly and hourly patterns that escape simple heuristics.
A critical finding, often overlooked in IAQ benchmarks, is the contrasting performance observed between use cases. While the MAPE remains low (3–5%) in OFFICE or RESIDENCE, it exceeds 30% in the HOSPITAL setting for all models, including LLMs. This systematic difference suggests that the historical CO2 TS alone is insufficient to capture the dynamics of continuously occupied, mechanically ventilated environments. The inclusion of exogenous variables, such as HVAC schedules, occupancy counts, or outdoor weather conditions, could potentially improve forecasting accuracy in such complex scenarios.
These findings have direct implications for the extrapolation of results from school environments. The trend observed in schools—where ML models outperform simple baselines as the prediction horizon increases—is validated in structured cases like OFFICE and DININGHALL but is not observed in sporadic spaces where simplicity prevails. Therefore, a one-size-fits-all model strategy is unfeasible.
The incorporation of Foundation Models and ensemble approaches represents a positive advancement over the benchmark established in schools. ENS and LLM-FT have demonstrated highly competitive performance in long-term predictions, outperforming the rest of the evaluated models at extended horizons. Statistical tests confirm that both approaches achieve equivalent performance, with no significant differences observed between them at t = 12 and t = 24 . Notably, LLM-ZS, despite not being the best-performing model overall, achieved competitive results without any local training, often surpassing trained models such as N-HiTS and XGB in several use cases. This generalization ability makes LLM-ZS a valuable candidate for deployment in scenarios with limited or no historical data available for model training, after which a transition to locally trained ensembles (ENS or LLM-FT) could optimize computational cost without sacrificing accuracy.

6. Conclusions and Future Work

This study presents a comprehensive methodological framework for CO2 forecasting using data from low-cost IoT sensors across six diverse indoor environments with heterogeneous occupancy dynamics, addressing a critical gap in indoor air quality research. By combining robust validation, statistical analysis, and scale-independent metrics across multiple prediction horizons and use cases, it establishes a reference benchmark for evaluating model performance under real-world contextual variability.
Furthermore, we evaluate the application of Foundation Models to indoor pollutant forecasting. While these models have recently revolutionized general ML tasks, their adaptation to time series forecasting remains nascent. This study provides a primary quantitative benchmark of their performance against standard ML approaches across multiple indoor scenarios, opening a promising research avenue in the IAQ domain.
By extending the benchmarking framework previously applied in schools [16] to these diverse indoor environments, our findings confirm that the optimal forecasting strategy is strictly dependent on the prediction horizon and the specific occupancy regime. Consistent with previous findings, simple and statistical models (SH, ARIMA) dominate in short-term horizons ( t = 1 ), driven by the strong short-term autocorrelation inherent to indoor CO2 dynamics. Conversely, as the horizon extends to medium- and long-term ranges ( t = 12 , t = 24 ), ML models—particularly ENS and LLM-FT—demonstrate superior robustness, exhibiting a more gradual performance degradation than baseline approaches. Statistical tests confirm this general trend; however, the analysis reveals that model performance is conditioned by specific use cases and local CO2 patterns, necessitating a preliminary analysis of the target space’s dynamics before deploying a forecasting solution.
Overall, this research provides evidence on the generalizability of performance patterns across use cases, while showing clear boundaries and context dependence. Beyond offering a tailored solution for specific environments, this study serves as a guideline for future IAQ research in different indoor settings by clarifying which findings from educational settings [16] replicate in other domains and which do not.
Building upon these findings, several future research directions emerge. This study has primarily focused on forecasting performance across different models and use cases. However, transitioning from research to production deployment requires addressing additional practical considerations, including model deployment costs, inference time, training time, and the need for periodic retraining. Future work should systematically evaluate these operational aspects to provide a comprehensive framework for real-world implementation.
Beyond these operational considerations, a pervasive challenge in the literature is the scarcity of large-scale, uninterrupted datasets from uncontrolled environments, which complicates extensive validation. While future work under project [19] aims to bridge this gap by expanding data collection, we also propose a complementary research avenue focused on model generalization to mitigate data dependence. Specifically, we will investigate both intra-use-case unification (e.g., a single model for all offices) and inter-use-case transferability (e.g., applying office-trained models to dining halls with similar cyclic patterns). Validating whether models can be successfully transferred between environments with shared behavioral characteristics would represent a significant industrial breakthrough, effectively bypassing the bottleneck of obtaining extensive historical data for every new deployment.

Author Contributions

Conceptualization, P.G.-P., A.J. and D.P.; methodology, P.G.-P., A.J. and D.P.; software, P.G.-P.; validation, A.J. and D.P.; formal analysis, P.G.-P., A.J. and D.P.; investigation, P.G.-P., A.J. and D.P.; resources, P.G.-P., A.J. and D.P.; data curation, P.G.-P., A.J. and D.P.; writing—original draft preparation, P.G.-P., A.J., M.F. and D.P.; writing—review and editing, P.G.-P., A.J., M.F. and D.P.; visualization, P.G.-P., A.J. and D.P.; supervision, A.J. and D.P.; project administration, P.G.-P., A.J. and D.P.; funding acquisition, P.G.-P., A.J. and D.P. All authors have read and agreed to the published version of the manuscript.

Funding

A.J. and D.P. were partially supported by the Spanish Ministry of Science and Innovation through the project PID2022-136627NB-I00 (MCIN/AEI/10.13039/501100011033/FEDER, UE). P.G.-P. was supported by the Government of Navarra under “Doctorados Industriales 2021”.

Data Availability Statement

Restrictions apply to the datasets. The datasets presented in this article are not readily available because the data are part of an ongoing study. Requests to access the datasets should be directed to P.G.-P.

Conflicts of Interest

Author Peio Garcia-Pinilla and author Maria Figols were employed by the company inBiot Monitoring. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A. Additional Results

Table A1. Global results of the MAE metric obtained by each model in the different evaluated prediction horizons (t). Minimum values for each row are highlighted in bold.
Table A1. Global results of the MAE metric obtained by each model in the different evaluated prediction horizons (t). Minimum values for each row are highlighted in bold.
Use CasetSHMAARIMARFXGBN-HiTSTCNTRFENSLLM-ZSLLM-FT
CONFROOM13.3978.4754.1016.7238.1248.9685.1495.1855.8988.9189.107
613.99715.5168.71122.69422.69221.76818.64812.89818.7417.68615.653
1221.99622.67311.91428.63530.1928.9826.50518.48426.324.59720.371
2429.52429.89815.7233.70335.81932.84835.14124.62931.97632.2924.751
DININGHALL12.616.8912.8583.6724.0214.8022.9978.2723.3296.5616.03
611.3813.3210.889.73710.2410.598.99112.648.71314.3610.34
1219.70621.43519.53114.39814.52614.27813.57716.15212.64223.85314.555
2431.77432.7833.18420.3220.55819.80720.0620.32418.04239.6422.632
HOSPITAL124.92370.49823.38333.90642.41653.22625.61242.69732.76964.61764.979
6116.583135.707107.27128.96140.207153.218109.614116.816119.989143.968128.364
12196.677212.676188.896198.545206.249209.548179.686183.205182.074221.744184.352
24309.482317.867304.94254.464265.296259.993259.677248.887241.127329.619250.461
MARKET13.8257.8853.6984.1024.7846.2613.8045.1854.2297.8537.675
612.66914.42912.30312.32913.22514.53811.8812.89811.76915.55913.686
1220.57322.09820.24318.26319.23319.54117.93818.48417.07123.36919.005
2431.42932.17131.32124.55225.53725.08125.49424.62923.29134.01225.547
OFFICE12.5955.32.7863.5224.1014.6963.0265.4593.3375.7725.523
68.3379.1368.3898.2948.7119.1447.9499.257.6610.0098.457
1212.89613.71513.01811.49411.91412.18111.38111.6510.71414.42511.161
2420.72521.55320.80915.18915.7215.516.44315.22214.40322.67616.282
RESIDENCE12.1725.4092.3474.1084.8796.1562.9385.3263.8545.4545.682
68.6789.8028.60311.01712.11513.31510.56911.02310.65110.68510.444
1213.69414.53213.70815.30617.25918.4116.47615.77915.60715.23214.461
2419.59119.8319.95520.62921.98625.29923.57423.18621.86320.08918.296
Table A2. Global results of the MAE Ratio metric rounded to three decimal places. Minimum values for each row (best performance) are highlighted in bold.
Table A2. Global results of the MAE Ratio metric rounded to three decimal places. Minimum values for each row (best performance) are highlighted in bold.
Use CasetSHMAARIMARFXGBN-HiTSTCNTRFENSLLM-ZSLLM-FT
CONFROOM11.0002.4951.2071.9792.3922.6401.5161.5261.7362.6252.681
61.0001.1090.6221.6211.6211.5551.3320.9221.3391.2641.118
121.0001.0310.5421.3021.3731.3181.2050.8401.1961.1180.926
241.0001.0130.5321.1421.2131.1131.1900.8341.0831.0940.838
DININGHALL11.0002.6401.0951.4071.5411.8401.1483.1691.2752.5142.310
61.0001.1710.9560.8560.9000.9300.7901.1110.7661.2620.909
121.0001.0880.9910.7310.7370.7250.6890.8200.6421.2100.739
241.0001.0321.0440.6400.6470.6230.6310.6400.5681.2480.712
HOSPITAL11.0002.8290.9381.3601.7022.1361.0281.7131.3152.5932.607
61.0001.1640.9201.1061.2031.3140.9401.0021.0291.2351.101
121.0001.0810.9601.0101.0491.0650.9140.9320.9261.1270.937
241.0001.0270.9850.8220.8570.8400.8390.8040.7791.0650.809
MARKET11.0002.0610.9671.0721.2511.6370.9951.3561.1062.0532.007
61.0001.1390.9710.9731.0441.1480.9381.0180.9291.2281.080
121.0001.0740.9840.8880.9350.9500.8720.8990.8301.1360.924
241.0001.0240.9970.7810.8130.7980.8110.7840.7411.0820.813
OFFICE11.0002.0421.0741.3571.5801.8101.1662.1041.2862.2242.128
61.0001.0961.0060.9951.0451.0970.9541.1100.9191.2011.014
121.0001.0641.0100.8910.9240.9450.8830.9030.8311.1190.866
241.0001.0401.0040.7330.7590.7480.7930.7350.6951.0940.786
RESIDENCE11.0002.4901.0811.8912.2462.8341.3532.4521.7742.5112.616
61.0001.1300.9911.2701.3961.5341.2181.2701.2271.2311.204
121.0001.0611.0011.1181.2601.3441.2031.1521.1401.1121.056
241.0001.0121.0191.0531.1221.2911.2031.1841.1161.0250.934
Table A3. Final MAPE results and standard deviation across validation folds ( ± S D ) for each device in the study (t = 1 and t = 6). All values rounded to two decimal places.
Table A3. Final MAPE results and standard deviation across validation folds ( ± S D ) for each device in the study (t = 1 and t = 6). All values rounded to two decimal places.
t  DeviceSHMAARIMARFXGBN-HiTSTCNTRFENSLLM-ZSLLM-FT
1CONFROOM_A0.67 ± 0.341.68 ± 0.900.79 ± 0.381.41 ± 1.231.79 ± 1.571.87 ± 1.191.15 ± 0.455.01 ± 3.031.19 ± 0.711.77 ± 1.001.90 ± 1.07
CONFROOM_B0.58 ± 0.331.42 ± 0.850.69 ± 0.381.05 ± 0.621.18 ± 0.731.63 ± 1.100.87 ± 0.473.09 ± 1.891.01 ± 0.601.48 ± 0.881.46 ± 0.93
DININGHALL_A0.58 ± 0.171.52 ± 0.410.63 ± 0.190.76 ± 0.250.83 ± 0.301.06 ± 0.340.68 ± 0.202.15 ± 0.830.72 ± 0.221.48 ± 0.421.35 ± 0.36
DININGHALL_B0.44 ± 0.141.24 ± 0.490.46 ± 0.140.60 ± 0.260.65 ± 0.310.79 ± 0.340.51 ± 0.151.63 ± 0.460.55 ± 0.221.09 ± 0.401.07 ± 0.39
DININGHALL_C0.59 ± 0.121.48 ± 0.340.67 ± 0.150.84 ± 0.330.91 ± 0.401.11 ± 0.390.68 ± 0.151.65 ± 0.350.76 ± 0.241.47 ± 0.321.32 ± 0.30
HOSPITAL_A2.85 ± 0.288.13 ± 0.932.91 ± 0.403.94 ± 1.004.70 ± 1.456.08 ± 1.173.23 ± 0.564.85 ± 0.733.94 ± 0.787.82 ± 0.957.77 ± 0.97
HOSPITAL_B3.10 ± 0.549.37 ± 1.782.83 ± 0.524.35 ± 0.855.50 ± 1.307.71 ± 2.023.28 ± 0.476.15 ± 0.854.45 ± 0.828.21 ± 1.308.61 ± 1.38
HOSPITAL_C2.24 ± 0.366.15 ± 0.842.02 ± 0.332.57 ± 0.353.03 ± 0.594.34 ± 0.902.21 ± 0.343.48 ± 0.392.66 ± 0.435.92 ± 0.925.77 ± 0.89
MARKET_A0.92 ± 0.111.75 ± 0.280.92 ± 0.110.99 ± 0.121.14 ± 0.201.46 ± 0.240.93 ± 0.131.21 ± 0.131.01 ± 0.131.81 ± 0.241.75 ± 0.27
MARKET_B0.73 ± 0.141.67 ± 0.340.68 ± 0.140.78 ± 0.200.90 ± 0.291.28 ± 0.360.72 ± 0.161.07 ± 0.160.82 ± 0.211.61 ± 0.291.59 ± 0.29
OFFICE_A0.50 ± 0.161.19 ± 0.390.55 ± 0.170.71 ± 0.240.87 ± 0.441.05 ± 0.480.58 ± 0.191.27 ± 0.340.68 ± 0.261.30 ± 0.421.25 ± 0.39
OFFICE_B0.81 ± 0.171.63 ± 0.280.86 ± 0.161.06 ± 0.191.19 ± 0.211.38 ± 0.270.93 ± 0.191.86 ± 0.220.99 ± 0.191.76 ± 0.331.66 ± 0.34
OFFICE_C0.33 ± 0.050.52 ± 0.130.36 ± 0.060.45 ± 0.090.51 ± 0.120.59 ± 0.130.39 ± 0.060.47 ± 0.070.44 ± 0.080.59 ± 0.130.58 ± 0.12
RESIDENCE_A0.22 ± 0.070.54 ± 0.200.24 ± 0.070.37 ± 0.190.43 ± 0.250.46 ± 0.170.27 ± 0.070.54 ± 0.170.31 ± 0.100.52 ± 0.190.54 ± 0.19
RESIDENCE_B0.78 ± 1.001.96 ± 2.620.83 ± 1.051.49 ± 1.691.74 ± 2.022.49 ± 3.151.07 ± 1.212.00 ± 1.521.49 ± 1.711.97 ± 2.592.09 ± 2.79
RESIDENCE_C0.25 ± 0.060.64 ± 0.200.29 ± 0.090.42 ± 0.160.51 ± 0.230.56 ± 0.230.31 ± 0.070.74 ± 0.340.37 ± 0.110.65 ± 0.190.65 ± 0.20
6CONFROOM_A2.77 ± 1.473.11 ± 1.682.88 ± 1.495.20 ± 2.765.16 ± 2.764.43 ± 2.364.01 ± 1.694.60 ± 1.834.10 ± 1.813.61 ± 2.043.04 ± 1.66
CONFROOM_B2.35 ± 1.412.64 ± 1.562.45 ± 1.463.93 ± 2.543.88 ± 2.604.17 ± 2.193.04 ± 1.783.64 ± 1.863.26 ± 1.672.89 ± 1.612.63 ± 1.61
DININGHALL_A 2.50 ± 0.682.92 ± 0.792.39 ± 0.652.17 ± 0.652.22 ± 0.712.38 ± 0.842.11 ± 0.602.80 ± 0.551.98 ± 0.613.27 ± 0.922.35 ± 0.62
DININGHALL_B2.06 ± 0.842.44 ± 1.031.86 ± 0.701.94 ± 0.712.05 ± 0.832.07 ± 0.851.64 ± 0.572.42 ± 0.651.69 ± 0.622.49 ± 0.991.94 ± 0.72
DININGHALL_C2.44 ± 0.572.85 ± 0.692.42 ± 0.551.98 ± 0.592.07 ± 0.632.19 ± 0.841.84 ± 0.462.76 ± 0.711.78 ± 0.563.07 ± 0.722.12 ± 0.49
HOSPITAL_A13.59 ± 1.6615.93 ± 1.9513.21 ± 1.6714.37 ± 2.8415.10 ± 2.8216.56 ± 2.9313.17 ± 2.2613.22 ± 1.4013.67 ± 2.3817.30 ± 2.3114.91 ± 1.90
HOSPITAL_B15.77 ± 3.0118.77 ± 3.7013.79 ± 2.4320.34 ± 4.3921.94 ± 5.0923.91 ± 4.3515.27 ± 2.4416.04 ± 2.2518.40 ± 3.4219.28 ± 3.2218.03 ± 2.95
HOSPITAL_C10.15 ± 1.3311.58 ± 1.419.69 ± 1.4410.87 ± 1.9011.95 ± 2.3212.33 ± 1.779.88 ± 1.5510.29 ± 1.0310.10 ± 1.5712.84 ± 1.6511.31 ± 1.38
MARKET_A2.79 ± 0.473.16 ± 0.572.76 ± 0.452.65 ± 0.382.86 ± 0.553.06 ± 0.562.53 ± 0.452.89 ± 0.442.51 ± 0.413.46 ± 0.572.94 ± 0.49
MARKET_B2.71 ± 0.583.10 ± 0.692.58 ± 0.532.73 ± 0.542.89 ± 0.603.27 ± 0.612.60 ± 0.542.72 ± 0.582.61 ± 0.503.31 ± 0.693.02 ± 0.62
OFFICE_A1.89 ± 0.622.09 ± 0.691.93 ± 0.642.01 ± 0.602.06 ± 0.632.24 ± 0.741.97 ± 0.982.23 ± 0.671.85 ± 0.592.29 ± 0.721.98 ± 0.63
OFFICE_B2.59 ± 0.422.87 ± 0.452.60 ± 0.412.38 ± 0.332.51 ± 0.402.59 ± 0.392.31 ± 0.382.92 ± 0.302.18 ± 0.323.10 ± 0.472.51 ± 0.40
OFFICE_C0.79 ± 0.220.84 ± 0.270.78 ± 0.220.91 ± 0.200.99 ± 0.291.05 ± 0.260.85 ± 0.210.82 ± 0.210.85 ± 0.190.98 ± 0.300.89 ± 0.24
RESIDENCE_A0.88 ± 0.341.01 ± 0.410.85 ± 0.351.06 ± 0.411.12 ± 0.461.12 ± 0.400.84 ± 0.321.03 ± 0.360.89 ± 0.311.08 ± 0.441.00 ± 0.40
RESIDENCE_B3.16 ± 4.263.56 ± 4.773.13 ± 4.194.11 ± 5.034.58 ± 5.345.22 ± 6.314.38 ± 5.044.37 ± 4.574.16 ± 4.983.86 ± 5.113.85 ± 5.26
RESIDENCE_C1.03 ± 0.331.18 ± 0.381.03 ± 0.331.28 ± 0.381.39 ± 0.441.48 ± 0.541.07 ± 0.331.18 ± 0.341.15 ± 0.371.31 ± 0.411.23 ± 0.40
Table A4. Final MAPE results and standard deviation ( ± S D ) for each device in the study ( t = 12 and t = 24 ). All values rounded to two decimal places.
Table A4. Final MAPE results and standard deviation ( ± S D ) for each device in the study ( t = 12 and t = 24 ). All values rounded to two decimal places.
tDeviceSHMAARIMARFXGBN-HiTSTCNTRFENSLLM-ZSLLM-FT
12 CONFROOM_A4.52 ± 2.434.64 ± 2.524.64 ± 2.456.50 ± 3.076.59 ± 3.476.13 ± 3.415.91 ± 2.225.95 ± 2.545.80 ± 2.464.99 ± 2.833.76 ± 1.98
CONFROOM_B3.78 ± 2.193.96 ± 2.243.91 ± 2.215.25 ± 2.955.77 ± 3.985.64 ± 3.234.74 ± 1.585.23 ± 1.934.87 ± 2.304.28 ± 2.303.66 ± 2.18
DININGHALL_A4.29 ± 1.164.65 ± 1.254.20 ± 1.133.26 ± 1.023.19 ± 0.873.17 ± 1.013.21 ± 0.893.61 ± 1.092.83 ± 0.855.45 ± 1.573.22 ± 0.87
DININGHALL_B3.62 ± 1.553.95 ± 1.713.46 ± 1.453.01 ± 1.082.98 ± 1.102.90 ± 1.142.69 ± 1.003.01 ± 1.122.58 ± 0.964.17 ± 1.732.85 ± 1.09
DININGHALL_C4.24 ± 1.064.64 ± 1.174.34 ± 1.052.86 ± 0.872.99 ± 0.822.99 ± 1.132.75 ± 0.763.52 ± 1.002.56 ± 0.815.15 ± 1.292.97 ± 0.73
HOSPITAL_A23.59 ± 3.1525.60 ± 3.5223.26 ± 3.1520.74 ± 3.9821.31 ± 4.7621.61 ± 4.0319.74 ± 3.4720.09 ± 3.7719.40 ± 3.5026.70 ± 3.8920.45 ± 2.57
HOSPITAL_B28.04 ± 5.7030.78 ± 6.4125.98 ± 5.1134.74 ± 9.6336.19 ± 11.5735.36 ± 7.9028.55 ± 5.7429.44 ± 5.2531.06 ± 7.3031.31 ± 5.7427.26 ± 4.56
HOSPITAL_C16.20 ± 1.9417.13 ± 2.0215.98 ± 2.0315.73 ± 2.3016.49 ± 2.4615.99 ± 1.9214.81 ± 2.2615.27 ± 1.1414.39 ± 1.9618.33 ± 2.1615.11 ± 1.93
MARKET_A4.53 ± 0.864.89 ± 0.964.50 ± 0.853.83 ± 0.704.05 ± 0.814.07 ± 0.783.75 ± 0.723.95 ± 0.673.57 ± 0.675.23 ± 0.954.01 ± 0.73
MARKET_B4.41 ± 1.034.72 ± 1.144.30 ± 0.964.15 ± 0.904.35 ± 0.804.45 ± 0.834.09 ± 0.874.13 ± 0.833.88 ± 0.754.95 ± 1.134.25 ± 0.89
OFFICE_A2.91 ± 0.983.12 ± 1.062.95 ± 1.022.78 ± 0.882.86 ± 0.922.95 ± 0.892.77 ± 1.292.78 ± 0.862.60 ± 0.863.32 ± 1.102.65 ± 0.88
OFFICE_B4.12 ± 0.654.40 ± 0.694.14 ± 0.653.33 ± 0.423.43 ± 0.413.45 ± 0.453.24 ± 0.563.50 ± 0.313.07 ± 0.404.50 ± 0.663.23 ± 0.46
OFFICE_C1.20 ± 0.421.26 ± 0.481.20 ± 0.421.34 ± 0.331.44 ± 0.411.46 ± 0.381.31 ± 0.371.26 ± 0.351.26 ± 0.311.43 ± 0.511.27 ± 0.39
RESIDENCE_A1.44 ± 0.611.55 ± 0.661.45 ± 0.641.61 ± 0.561.65 ± 0.581.73 ± 0.671.41 ± 0.541.54 ± 0.631.43 ± 0.511.66 ± 0.731.46 ± 0.61
RESIDENCE_B4.98 ± 6.635.29 ± 6.994.96 ± 6.555.65 ± 6.746.79 ± 7.787.64 ± 8.706.84 ± 8.116.36 ± 6.816.25 ± 7.145.43 ± 6.945.29 ± 7.07
RESIDENCE_C1.69 ± 0.551.80 ± 0.591.69 ± 0.561.88 ± 0.581.94 ± 0.641.97 ± 0.651.69 ± 0.531.69 ± 0.531.67 ± 0.521.93 ± 0.611.76 ± 0.58
24CONFROOM_A6.01 ± 3.556.13 ± 3.656.20 ± 3.597.00 ± 3.127.55 ± 3.356.90 ± 4.297.97 ± 4.316.08 ± 1.716.90 ± 3.446.58 ± 4.184.43 ± 2.42
CONFROOM_B5.47 ± 3.125.55 ± 3.155.70 ± 3.177.00 ± 3.497.39 ± 4.156.47 ± 3.186.51 ± 2.105.66 ± 1.786.29 ± 2.626.03 ± 3.354.82 ± 2.78
DININGHALL_A 6.89 ± 1.887.10 ± 1.956.94 ± 1.884.56 ± 1.084.43 ± 1.024.15 ± 0.894.54 ± 1.004.30 ± 1.183.90 ± 0.869.04 ± 2.764.80 ± 1.23
DININGHALL_B5.83 ± 2.596.02 ± 2.696.13 ± 2.814.38 ± 1.764.47 ± 1.734.18 ± 1.634.09 ± 1.434.16 ± 1.833.81 ± 1.506.98 ± 3.104.38 ± 1.81
DININGHALL_C7.12 ± 1.857.39 ± 1.937.58 ± 1.934.09 ± 0.934.22 ± 0.884.26 ± 1.404.25 ± 1.114.42 ± 1.273.78 ± 0.999.05 ± 2.374.71 ± 1.17
HOSPITAL_A37.60 ± 6.0838.53 ± 6.4037.35 ± 5.7925.42 ± 5.3426.61 ± 7.2425.30 ± 5.6026.93 ± 5.8325.08 ± 6.8424.06 ± 4.9838.89 ± 6.6126.40 ± 4.51
HOSPITAL_B47.09 ± 10.2248.81 ± 10.6545.06 ± 9.7046.15 ± 13.2546.61 ± 13.5245.76 ± 10.8945.29 ± 14.9042.86 ± 10.9543.17 ± 12.0950.41 ± 10.9339.32 ± 7.18
HOSPITAL_C23.25 ± 2.7623.63 ± 2.8323.17 ± 2.7619.60 ± 2.4920.72 ± 2.3619.16 ± 2.3119.73 ± 2.9719.33 ± 2.3118.05 ± 2.3224.65 ± 2.8919.02 ± 2.43
MARKET_A7.10 ± 1.407.28 ± 1.437.10 ± 1.405.14 ± 1.245.41 ± 1.215.27 ± 1.195.43 ± 1.165.18 ± 1.014.89 ± 1.067.85 ± 1.405.39 ± 1.04
MARKET_B6.62 ± 1.706.77 ± 1.766.57 ± 1.655.64 ± 1.085.82 ± 0.945.72 ± 1.045.82 ± 1.255.64 ± 1.095.30 ± 0.987.02 ± 1.785.69 ± 1.23
OFFICE_A4.65 ± 1.634.84 ± 1.704.67 ± 1.673.68 ± 1.143.81 ± 1.123.78 ± 1.173.87 ± 1.373.52 ± 1.043.45 ± 1.035.13 ± 1.803.87 ± 1.34
OFFICE_B6.83 ± 1.077.15 ± 1.146.84 ± 1.074.32 ± 0.424.51 ± 0.464.41 ± 0.774.78 ± 1.094.50 ± 0.494.14 ± 0.607.33 ± 1.104.70 ± 0.56
OFFICE_C1.87 ± 0.781.91 ± 0.821.87 ± 0.781.97 ± 0.442.00 ± 0.502.01 ± 0.551.97 ± 0.551.96 ± 0.461.84 ± 0.452.14 ± 0.871.86 ± 0.62
RESIDENCE_A2.24 ± 0.972.31 ± 1.002.33 ± 1.062.36 ± 0.792.31 ± 0.782.35 ± 0.942.14 ± 0.822.21 ± 1.002.07 ± 0.742.49 ± 1.142.10 ± 0.91
RESIDENCE_B7.02 ± 8.877.07 ± 8.857.09 ± 8.837.74 ± 8.458.63 ± 9.5711.14 ± 15.6510.32 ± 13.529.62 ± 10.999.28 ± 11.826.88 ± 7.876.44 ± 7.71
RESIDENCE_C2.56 ± 0.822.63 ± 0.852.58 ± 0.842.57 ± 0.872.54 ± 0.812.52 ± 0.842.41 ± 0.762.36 ± 0.722.29 ± 0.702.74 ± 0.852.39 ± 0.75

References

  1. Klepeis, N.E.; Nelson, W.C.; Ott, W.R.; Robinson, J.P.; Tsang, A.M.; Switzer, P.; Behar, J.V.; Hern, S.C.; Engelmann, W.H. The National Human Activity Pattern Survey (NHAPS): A resource for assessing exposure to environmental pollutants. J. Expo. Anal. Environ. Epidemiol. 2001, 11, 231–252. [Google Scholar] [CrossRef] [Scilit]
  2. Tham, K.W. Indoor air quality and its effects on humans—A review of challenges and developments in the last 30 years. Energy Build. 2016, 130, 637–650. [Google Scholar] [CrossRef] [Scilit]
  3. Kumar, P.; Skouloudis, A.N.; Bell, M.; Viana, M.; Carotta, M.C.; Biskos, G.; Morawska, L. Real-time sensors for indoor air monitoring and challenges ahead in deploying them to urban buildings. Sci. Total. Environ. 2016, 560–561, 150–159. [Google Scholar] [CrossRef] [Scilit]
  4. Botchkarev, A. A New Typology Design of Performance Metrics to Measure Errors in Machine Learning Regression Algorithms. Interdiscip. J. Inf. Knowl. Manag. 2019, 14, 045–076. [Google Scholar] [CrossRef] [Scilit]
  5. Persily, A.K. Evaluating Building IAQ and Ventilation with Indoor Carbon Dioxide; Technical Report; National Institute of Standards and Technology (NIST): Gaithersburg, MD, USA, 1997. [Google Scholar]
  6. ASHRAE. ASHRAE Position Document on Indoor Carbon Dioxide; Position document; American Society of Heating, Refrigerating and Air-Conditioning Engineers: Peachtree Corners, GA, USA, 2025; Available online: https://www.ashrae.org/file%20library/about/position%20documents/pd-on-indoor-carbon-dioxide-english.pdf (accessed on 12 February 2025).
  7. Franco, A.; Leccese, F. Measurement of CO2 concentration for occupancy estimation in educational buildings with energy efficiency purposes. J. Build. Eng. 2020, 32, 101714. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  8. Saini, J.; Dutta, M.; Marques, G. Machine Learning for Indoor Air Quality Assessment: A Systematic Review and Analysis. Environ. Model. Assess. 2025, 30, 417–434. [Google Scholar] [CrossRef] [Scilit]
  9. Rescio, G.; Manni, A.; Caroppo, A.; Carluccio, A.M.; Siciliano, P.; Leone, A. Multi-Sensor Platform for Predictive Air Quality Monitoring. Sensors 2023, 23, 5139. [Google Scholar] [CrossRef] [Scilit]
  10. Taheri, S.; Razban, A. Learning-based CO2 concentration prediction: Application to indoor air quality control using demand-controlled ventilation. Build. Environ. 2021, 205, 108164. [Google Scholar] [CrossRef] [Scilit]
  11. Guyot, G.; Sherman, M.H.; Walker, I.S. Smart ventilation energy and indoor air quality performance in residential buildings: A review. Energy Build. 2018, 165, 416–430. [Google Scholar] [CrossRef] [Scilit]
  12. Kallio, J.; Tervonen, J.; Räsänen, P.; Mäkynen, R.; Koivusaari, J.; Peltola, J. Forecasting office indoor CO2 concentration using machine learning with a one-year dataset. Build. Environ. 2020, 187, 107409. [Google Scholar] [CrossRef] [Scilit]
  13. Latoń, D.; Grela, J.; Ożadowicz, A.; Wisniewski, L. Artificial Intelligence and Machine Learning Approaches for Indoor Air Quality Prediction: A Comprehensive Review of Methods and Applications. Energies 2025, 18, 5194. [Google Scholar] [CrossRef] [Scilit]
  14. Hashir, P.K.; Veerasingam, S.; Haris, R.M.; Sadooni, F.; Ghani, S. A systematic review of artificial intelligence applications for indoor air quality monitoring in educational settings. Eng. Appl. Artif. Intell. 2025, 134, 113383. [Google Scholar] [CrossRef] [Scilit]
  15. Romaios, A.; Sfikas, P.; Giannadakis, A.; Panidis, T.; Paravantis, J.A.; Skouras, E.D.; Mihalakakou, G. Artificial Intelligence for Enhancing Indoor Air Quality in Educational Environments: A Review and Future Perspectives. Sustainability 2025, 17, 10117. [Google Scholar] [CrossRef] [Scilit]
  16. Garcia-Pinilla, P.; Jurio, A.; Paternain, D. A Comparative Study of CO2 Forecasting Strategies in School Classrooms: A Step Toward Improving Indoor Air Quality. Sensors 2025, 25, 2173. [Google Scholar] [CrossRef] [Scilit]
  17. Mannan, M.; Al-Ghamdi, S.G. Indoor Air Quality in Buildings: A Comprehensive Review on the Factors Influencing Air Pollution in Residential and Commercial Structure. Int. J. Environ. Res. Public Health 2021, 18, 3276. [Google Scholar] [CrossRef] [Scilit]
  18. Emmerich, S.J.; Persily, A.K. State-of-the-Art Review of CO2 Demand Controlled Ventilation Technology and Application; Technical Report NISTIR 6729; National Institute of Standards and Technology (NIST): Gaithersburg, MD, USA, 2001. [Google Scholar]
  19. K-HEALTHinAIR Consortium. K-HEALTHinAIR: Knowledge for Improving Indoor Air Quality and Health. 2023. Available online: https://k-healthinair.eu (accessed on 22 May 2025).
  20. RESET® Standard. Available online: https://www.reset.build/directory/monitors/rm-047 (accessed on 12 June 2025).
  21. Box, G.E.P.; Jenkins, G.M. Time Series Analysis: Forecasting and Control; Holden-Day, Inc.: Holden, MA, USA, 1976. [Google Scholar]
  22. Herzen, J.; Lässig, F.; Piazzetta, S.G.; Neuer, T.; Tafti, L.; Raille, G.; Pottelbergh, T.V.; Pasieka, M.; Skrodzki, A.; Huguenin, N.; et al. Darts: User-Friendly Modern Machine Learning for Time Series. J. Mach. Learn. Res. 2022, 23, 1–6. [Google Scholar]
  23. Ho, T.K. Random decision forests. In Proceedings of the 3rd International Conference on Document Analysis and Recognition (ICDAR), Montreal, QC, Canada, 14–16 August 1995; Volume 1, pp. 278–282. [Google Scholar]
  24. Chen, T.; Guestrin, C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD ’16), San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
  25. Challu, C.; Olivares, K.G.; Oreshkin, B.N.; Garza, F.; Mergenthaler-Canseco, M.; Dubrawski, A. N-HiTS: Neural Hierarchical Interpolation for Time Series Forecasting. arXiv 2022, arXiv:2201.12886. [Google Scholar]
  26. Lea, C.; Vidal, R.; Reiter, A.; Hager, G.D. Temporal Convolutional Networks: A Unified Approach to Action Segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 156–165. [Google Scholar]
  27. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. arXiv 2023, arXiv:1706.03762. [Google Scholar]
  28. Bates, J.M.; Granger, C.W.J. The Combination of Forecasts. Oper. Res. Q. 1969, 20, 451–468. [Google Scholar]
  29. Wang, X.; Hyndman, R.J.; Li, F.; Kang, Y. Forecast combinations: An over 50-year review. Int. J. Forecast. 2023, 39, 1518–1547. [Google Scholar] [CrossRef] [Scilit]
  30. Science, A. Chronos Forecasting: Learning the Language of Time Series. 2024. Available online: https://github.com/amazon-science/chronos-forecasting (accessed on 17 September 2025).
  31. Ansari, A.; Duncan, C.; Kanellopoulos, D.; Rajagopal, D.; Rodrigues, F.; Le, T.; Avramidis, E.; Oreshkin, B.; Bontempelli, A.; Thavarajah, R.; et al. Chronos: Learning the Language of Time Series. arXiv 2024, arXiv:2403.07815. [Google Scholar] [CrossRef] [Scilit]
  32. Erickson, N.; Mueller, J.; Shirkov, A.; Zhang, H.; Larroy, P.; Li, M.; Smola, A. AutoGluon-Tabular: Robust and Accurate AutoML for Structured Data. arXiv 2020, arXiv:2003.06505. [Google Scholar]
  33. Elsayed, S.; Thyssens, D.; Rashed, A.; Jomaa, H.S.; Schmidt-Thieme, L. Do We Really Need Deep Learning Models for Time Series Forecasting? arXiv 2021, arXiv:2101.02118. [Google Scholar] [CrossRef] [Scilit]
  34. Makridakis, S.; Spiliotis, E.; Assimakopoulos, V. Statistical and machine learning forecasting methods: Concerns and ways forward. PLoS ONE 2018, 13, e0194889. [Google Scholar] [CrossRef] [Scilit]
  35. Tashman, L.J. Out-of-sample tests of forecasting accuracy: An analysis and review. Int. J. Forecast. 2000, 16, 437–450. [Google Scholar] [CrossRef] [Scilit]
  36. Hyndman, R.J.; Koehler, A.B. Another look at measures of forecast accuracy. Int. J. Forecast. 2006, 22, 679–688. [Google Scholar] [CrossRef] [Scilit]
  37. Hyndman, R.J.; Athanasopoulos, G. Forecasting: Principles and Practice, 2nd ed.; OTexts: Melbourne, Australia, 2018. [Google Scholar]
  38. Uriz, M.; Paternain, D.; Dominguez-Catena, I.; Bustince, H.; Galar, M. Unsupervised Fuzzy Measure Learning for Classifier Ensembles From Coalitions Performance. IEEE Access 2020, 8, 52288–52305. [Google Scholar] [CrossRef] [Scilit]
  39. Hodges, J.L.; Lehmann, E.L. Rank Methods for Combination of Independent Experiments in Analysis of Variance. Ann. Math. Stat. 1962, 33, 403–418. [Google Scholar] [CrossRef] [Scilit]
  40. Holm, S. A Simple Sequentially Rejective Multiple Test Procedure. Scand. J. Stat. 1979, 6, 65–70. [Google Scholar]
  41. Wilcoxon, F. Individual Comparisons by Ranking Methods. Biom. Bull. 1945, 1, 80–83. [Google Scholar] [CrossRef] [Scilit]
  42. Demsar, J. Statistical Comparisons of Classifiers over Multiple Data Sets. J. Mach. Learn. Res. 2006, 7, 1–30. [Google Scholar]
  43. Garcia, S.; Herrera, F. An Extension on “Statistical Comparisons of Classifiers over Multiple Data Sets” for all Pairwise Comparisons. J. Mach. Learn. Res. 2008, 9, 2677–2694. [Google Scholar]
  44. García, S.; Fernández, A.; Luengo, J.; Herrera, F. Advanced Nonparametric Tests for Multiple Comparisons in the Design of Experiments in Computational Intelligence and Data Mining: Experimental Analysis of Power. Inf. Sci. 2010, 180, 2044–2064. [Google Scholar] [CrossRef] [Scilit]
  45. García, S.; Fernández, A.; Luengo, J.; Herrera, F. A Study of Statistical Techniques and Performance Measures for Genetics-Based Machine Learning: Accuracy and Interpretability. Soft Comput. 2009, 13, 959–977. [Google Scholar]
Figure 1. Distribution of the data used in the study. The horizontal axis represents the dates, and the vertical axis shows the devices, grouped by use case. The highlighted area of each device shows the 18-week subset chosen for the study.
Figure 1. Distribution of the data used in the study. The horizontal axis represents the dates, and the vertical axis shows the devices, grouped by use case. The highlighted area of each device shows the 18-week subset chosen for the study.
Forecasting 08 00026 g001
Figure 2. Weekly CO2 concentration patterns across the use cases. Each heatmap represents one environment, illustrating the temporal distribution of CO2 levels throughout the week. The visualization highlights the characteristic occupancy patterns within each space.
Figure 2. Weekly CO2 concentration patterns across the use cases. Each heatmap represents one environment, illustrating the temporal distribution of CO2 levels throughout the week. The visualization highlights the characteristic occupancy patterns within each space.
Forecasting 08 00026 g002
Figure 3. Overview of the experimental setup used to evaluate each model (m) for each prediction instant (t). For every use case ( U C ), the process is applied to all devices using 14-fold Rolling-CV.
Figure 3. Overview of the experimental setup used to evaluate each model (m) for each prediction instant (t). For every use case ( U C ), the process is applied to all devices using 14-fold Rolling-CV.
Forecasting 08 00026 g003
Figure 4. Schematic of the input-target formation for the 1 h horizon ( t = 6 ). A fixed look-back window of L observations ( L = 144 , 24 h) forms the input vector X i , while the target is the CO2 concentration at x i + 6 .
Figure 4. Schematic of the input-target formation for the 1 h horizon ( t = 6 ). A fixed look-back window of L observations ( L = 144 , 24 h) forms the input vector X i , while the target is the CO2 concentration at x i + 6 .
Forecasting 08 00026 g004
Figure 5. Dataset generation through the sliding window strategy across the time series.
Figure 5. Dataset generation through the sliding window strategy across the time series.
Forecasting 08 00026 g005
Figure 6. Diagram of the first three folds generated using the Rolling-CV technique, with each fold comprising four weeks for training (T) and one week for validation (V).
Figure 6. Diagram of the first three folds generated using the Rolling-CV technique, with each fold comprising four weeks for training (T) and one week for validation (V).
Forecasting 08 00026 g006
Figure 7. Heatmap visualization of the MAE Ratio metric across different use cases and forecasting horizons (t). Green shades indicate distinct improvement over the reference baseline model (SH), while red shades represent lower performance.
Figure 7. Heatmap visualization of the MAE Ratio metric across different use cases and forecasting horizons (t). Green shades indicate distinct improvement over the reference baseline model (SH), while red shades represent lower performance.
Forecasting 08 00026 g007
Figure 8. Evolution of MAE Ratio metric across prediction horizons for each indoor use case. Each subplot corresponds to one use case, and curves represent the evaluated models.
Figure 8. Evolution of MAE Ratio metric across prediction horizons for each indoor use case. Each subplot corresponds to one use case, and curves represent the evaluated models.
Forecasting 08 00026 g008
Figure 9. Hierarchical statistical analysis results across the four forecasting horizons (t). Average ranks obtained from the statistical tests are displayed next to each model. For pairwise comparisons (Wilcoxon test), the resulting p-values are reported, whereas for group comparisons (Friedman test), the decision of Holm’s post hoc test is indicated.
Figure 9. Hierarchical statistical analysis results across the four forecasting horizons (t). Average ranks obtained from the statistical tests are displayed next to each model. For pairwise comparisons (Wilcoxon test), the resulting p-values are reported, whereas for group comparisons (Friedman test), the decision of Holm’s post hoc test is indicated.
Forecasting 08 00026 g009
Table 1. Statistics of the CO2 concentration (ppm) measured by each device included in the study. The columns show the use case, device identifier, the mean concentration, and the standard deviation (Std). The values in bold correspond to the average (AVG) mean and standard deviation computed across all devices within each use case.
Table 1. Statistics of the CO2 concentration (ppm) measured by each device included in the study. The columns show the use case, device identifier, the mean concentration, and the standard deviation (Std). The values in bold correspond to the average (AVG) mean and standard deviation computed across all devices within each use case.
Use CaseDeviceMeanStd
CONFROOM1431.8076.62
2435.4472.38
AVG433.6274.50
DININGHALL1438.7453.28
2438.2250.58
3435.5351.53
AVG437.5051.80
HOSPITAL1856.57316.00
2865.28259.43
31,059.46618.09
AVG927.10397.84
MARKET1441.6137.72
2441.3136.69
AVG441.4637.20
OFFICE1411.3412.77
2431.4243.88
3442.0260.36
AVG428.2639.00
RESIDENCE1416.2516.62
2416.6219.06
3472.43116.38
AVG435.1050.68
Table 2. Model-specific configurations used in this study.
Table 2. Model-specific configurations used in this study.
ModelConfiguration
RF n _ e s t i m a t o r s = 100 ; remaining parameters set to DARTS defaults [22].
XGBParameters set to DARTS defaults [22].
N-HiTS3 stacks; 1 block per stack; 2 dense layers per block (512 units each); ReLU activations.
TCNKernel size = 4; 64 filters; dilation base = 2.
TRF3 encoder + 3 decoder layers; 4 attention heads; embedding size = 64; FFN = 512 (ReLU).
LLM-ZS, LLM-FTInput context length set to the selected window size (144).
FFN: feed-forward network.
Table 3. Global results of the MAPE metric obtained by each model in the different evaluated prediction horizons (t). In bold, the best result for each prediction instant.
Table 3. Global results of the MAPE metric obtained by each model in the different evaluated prediction horizons (t). In bold, the best result for each prediction instant.
Use CasetSHMAARIMARFXGBN-HiTSTCNTRFENSLLM-ZSLLM-FT
CONFROOM10.6261.5530.7371.2291.4851.7491.0114.0501.1001.6251.680
62.5632.8742.6624.5664.5194.3003.5244.1233.6813.2492.834
124.1484.3034.2735.8786.1825.8835.3225.5915.3334.6343.709
245.7415.8385.9466.9987.4706.6847.2395.8666.5956.3064.625
DININGHALL10.5341.4130.5850.7310.7940.9860.6221.8090.6781.3441.248
62.3322.7352.2222.0282.1152.2171.8642.6591.8162.9422.137
124.0504.4133.9973.0433.0533.0202.8803.3822.6594.9213.013
246.6116.8346.8844.3424.3744.1984.2924.2903.8298.3564.630
HOSPITAL12.7297.8822.5863.6184.4086.0432.9084.8283.6807.3137.380
613.17115.42612.22915.19116.32817.60012.77213.18114.05616.47414.751
1222.60924.49921.74223.74024.66424.32021.03521.60121.61325.44920.942
2435.98336.99135.19130.38831.31530.07230.64729.08728.42837.98128.247
MARKET10.8281.7100.8020.8851.0241.3670.8231.1400.9141.7081.670
62.7493.1332.6722.6862.8723.1602.5622.8052.5583.3862.978
124.4714.8054.4003.9944.2034.2623.9164.0383.7215.0904.129
246.8597.0246.8335.3935.6135.4955.6225.4085.0977.4335.537
OFFICE10.5471.1150.5870.7380.8551.0060.6331.2000.7051.2161.161
61.7561.9331.7671.7651.8531.9601.7071.9901.6282.1231.792
122.7432.9252.7642.4812.5762.6192.4402.5132.3113.0812.384
244.4504.6334.4603.3243.4383.4003.5413.3283.1434.8643.474
RESIDENCE10.4171.0480.4510.7620.8931.1680.5501.0940.7241.0501.096
61.6891.9171.6702.1502.3592.6052.0982.1932.0662.0822.024
122.7042.8802.7003.0463.4583.7763.3123.1993.1163.0062.835
243.9384.0024.0014.2214.4965.3404.9574.7274.5484.0383.643
Table 4. Pairwise statistical comparison using the Wilcoxon signed-rank test between the best-performing ML-based model (Control) and the remaining ML architectures for the selected forecasting horizons. The values displayed correspond to the sum of ranks computed by the test. The notation (R) indicates that the null hypothesis of equivalence is rejected at α = 0.05 , confirming that the Control model significantly outperforms the compared method. Conversely, (NR) denotes that the hypothesis is not rejected, implying no statistical evidence of a performance difference.
Table 4. Pairwise statistical comparison using the Wilcoxon signed-rank test between the best-performing ML-based model (Control) and the remaining ML architectures for the selected forecasting horizons. The values displayed correspond to the sum of ranks computed by the test. The notation (R) indicates that the null hypothesis of equivalence is rejected at α = 0.05 , confirming that the Control model significantly outperforms the compared method. Conversely, (NR) denotes that the hypothesis is not rejected, implying no statistical evidence of a performance difference.
tBest MLRFXGBN-HiTSTCNTRFLLM-ZSLLM-FT
12ENS124.0 (R)136.0 (R)136.0 (R)113.0 (R)120.0 (R)116.0 (R)79.0 (NR)
24ENS121.0 (R)125.0 (R)135.0 (R)136.0 (R)104.0 (NR)124.0 (R)79.0 (NR)
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Garcia-Pinilla, P.; Jurio, A.; Figols, M.; Paternain, D. The Impact of Occupancy Dynamics on Indoor CO2 Forecasting: A Cross-Scenario Evaluation. Forecasting 2026, 8, 26. https://doi.org/10.3390/forecast8020026

AMA Style

Garcia-Pinilla P, Jurio A, Figols M, Paternain D. The Impact of Occupancy Dynamics on Indoor CO2 Forecasting: A Cross-Scenario Evaluation. Forecasting. 2026; 8(2):26. https://doi.org/10.3390/forecast8020026

Chicago/Turabian Style

Garcia-Pinilla, Peio, Aranzazu Jurio, Maria Figols, and Daniel Paternain. 2026. "The Impact of Occupancy Dynamics on Indoor CO2 Forecasting: A Cross-Scenario Evaluation" Forecasting 8, no. 2: 26. https://doi.org/10.3390/forecast8020026

APA Style

Garcia-Pinilla, P., Jurio, A., Figols, M., & Paternain, D. (2026). The Impact of Occupancy Dynamics on Indoor CO2 Forecasting: A Cross-Scenario Evaluation. Forecasting, 8(2), 26. https://doi.org/10.3390/forecast8020026

Article Metrics

Back to TopTop