Indoor air quality plays a critical role in human health and well-being, as it is influenced by daily activities such as cooking, cleaning, or exposure to smoke. This study aims to assess indoor air quality in four distinct contexts: rest, cooking, smoke, and cleaning. To achieve this, an experimental setup was developed using MQ2, MQ4, MQ7, and MQ135 gas sensors, together with a DHT11 temperature/humidity sensor. The collected data were structured into CSV files and analyzed using two machine learning models: k-nearest neighbors (k-NN) and a classical neural network.
The results demonstrated strong classification performance from both models. The k-NN model achieved an accuracy of 97.75% on the training set and 96.8% on the test set. In comparison, the classical neural network outperformed k-NN, reaching a test accuracy of 98.5%. This indicates the superior ability of neural networks to capture nonlinear patterns in sensor data, providing more reliable classification of air quality contexts.
In conclusion, the findings highlight the potential of combining gas sensors with machine learning to build effective and intelligent systems for monitoring indoor air quality. Future work will focus on optimizing the neural network architecture, reducing computational cost, and integrating additional environmental parameters to further improve performance and applicability in real-world conditions.
