Smart room occupancy detection using neural networks and the puma optimization algorithm

E El-Sayed M. El-kenawy A Ahmed Mohamed Zaki E Ebrahim A. Mattar A Amel Ali Alhussan D Doaa Sami Khafaga M Marwa M. Eid M Mervat El-Seddek

Abstract

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 $$\hbox {CO}_2$$ 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.

Article Details

Volume / Issue Vol. 15, Issue 1
Published December 20, 2025
ISSN 2045-2322
Publisher Nature Portfolio

Journal Info

Scientific Reports

Nature Portfolio

ISSN: 2045-2322 Open Access Life Sciences

Authors (7)

E

El-Sayed M. El-kenawy

A

Ahmed Mohamed Zaki

E

Ebrahim A. Mattar

A

Amel Ali Alhussan

D

Doaa Sami Khafaga

M

Marwa M. Eid

M

Mervat El-Seddek