Abstract
Room occupancy detection with reasonable accuracy is indispensable for developing innovative building systems that provide energy-efficient management, increased security, and greater comfort. The existing occupancy detection solutions based on traditional sensors suffer from high installation costs, a lack of scalability, and the inability to adapt to dynamic environments. This study proposes an optimized machine learning (ML) approach using a Neural Network (NN) model tailored with a Puma Optimizer Sine Cosine Optimizer (POSC) metaheuristic optimization technique to address these challenges. Based on environmental sensor data, such as temperature, humidity, light intensity, and [Formula: see text] levels, the proposed model achieves high accuracy in predicting room occupancy. The optimization process helps reinforce the training of the NN model through a dynamic equilibrium between exploration and exploitation, achieving faster convergence speed and better classification. The model is evaluated and compared on a publicly available dataset with other optimization techniques such as the Genetic Algorithm (GA) and Grey Wolf Optimization (GWO). Experimental results prove that the POSC-optimized NN model achieves superior classification and significantly outperforms conventional ML methods in terms of accuracy, precision, recall, and F1-score. These findings suggest that the combined use of metaheuristic optimization and deep learning can be a practical approach for real-world applications in intelligent building automation. The solutions proposed in this research may contribute to the growing field of intelligent occupancy detection and energy-efficient systems for future smart environments.