# IAQ Prediction in Apartments Using Machine Learning Techniques and Sensor Data
###### Abstract  
This study explores the capability of machine learning techniques (MLTs) in predicting IAQ in apartments. Sensor data from kitchen air monitoring were used to determine the conditions in the living room. The analysis was based on several air parameters--temperature, relative humidity, CO\({}_{2}\) concentration, and TVOC--recorded in five apartments. Multiple input-multiple output prediction models were built. Linear (multiple linear regression and multilayer perceptron (MLP)) and nonlinear (decision trees, random forest, k-nearest neighbors, and MLP) methods were investigated. Five-fold cross-validation was applied, where four apartments provided data for model training and the remaining one was the source of the test data. The models were compared using performance metrics (R\({}^{2}\), MAPE, and RMSE). The naive approach was used as the benchmark. This study showed that linear MLTs performed best. In this case, the coefficients of determination were highest: R\({}^{2}\) = 0.94 (T), R\({}^{2}\) = 0.94 (RH), R\({}^{2}\) = 0.63 (CO\({}_{2}\)), R\({}^{2}\) = 0.84 (TVOC, based on the SGP30 sensor), and R\({}^{2}\) = 0.92 (TVOC, based on the SGP30 sensor). The prediction of distinct indoor air parameters was not equally effective. Based on the lowest percentage error, best predictions were attained for indoor air temperature (MAPE = 1.57%), relative humidity (MAPE = 2.97%RH), and TVOC content (MAPE = 0.41%). Unfortunately, CO\({}_{2}\) prediction was loaded with high error (MAPE = 20.83%). The approach was particularly effective in open-kitchen apartments, and they could be the target for its application. This research offers a method that could contribute to attaining effective IAQ control in apartments. Keywords:indoor air quality; sensor; monitoring; regression; volatile organic compounds +
Footnote †: journal:  
commercial buildings built today are not equipped with IAQ monitoring systems. Regular indoor air monitoring is typically limited to smoke and carbon monoxide (CO) detectors. Advanced heating, ventilation, and air conditioning (HVAC) systems using carbon dioxide (CO\({}_{2}\)) sensors to control ventilation are not common yet. Due to the large spatiotemporal heterogeneity of indoor air properties, real-time multipoint monitoring is recommended. Sensor networks are appropriate for this task [5]. The existing IAQ monitoring strategies typically use networks of fixed/rigid sensor nodes that are often deployed in an ad-hoc manner. However, this approach may be limited in covering the areas/zones of interest or in accounting for the variations of the physical parameters over time. In addition, multipoint monitoring comes with many shortcomings, such as long deployment times, high maintenance costs, power supply limitations, and dependence on telemetry systems. Apartments constitute prominent objects of interest regarding IAQ. They are occupied by individuals spanning various age groups, including children and the elderly [6], who are particularly susceptible to diseases. On the other hand, a man of working age uses them as a space providing comfortable conditions for rest and regeneration. Several studies on IAQ in apartments offer the general perception of indoor conditions in the context of the geographical location and seasonality [7; 8], occupants' income level [8], age group [6], type of building [9], or abnormal but persistent conditions for society's functioning, e.g., COVID-19 [10]. Researchers are interested in factors influencing indoor conditions in apartments and the evaluation of their impact. A trend toward energy saving via enforced thermo-modernization changes the building's surrounding interaction, which is not indifferent to apartments' IAQ [11; 12]. Among factors influencing IAQ, principal attention is given to ventilation systems and their design, control principles, and algorithms [13; 14]. This is due to their dominant role in assuring proper IAQ.