Using Artificial Neural Networks with GridSearchCV for Predicting Indoor Temperature in a Smart Home - Alshammari, Talal (Engineering, Technology & Applied Science Research, 2024)
The acceleration of house technology via the use of mobile phones has made it easier to control houses, where occupants (especially older people) spend most of their time. The climate of Saudi Arabia, especially in the northern area, is too hot during summer and cold during winter. Control of the indoor environment in a smart home is a preferable choice that can reduce power consumption to operate heating, ventilation, and air-conditioning. Machine learning algorithms have been used to predict physical variables of indoor environment, such as temperature and humidity. The model can be trained, learn, and make predictions using historical data. Machine learning techniques can automate temperature monitoring and control. This paper proposes an algorithm that combines Artificial Neural Networks (ANNs) and GridSearchCV to predict physical variables in indoor environments in Saudi Arabia. GridSearchCV was utilized to tune the parameters of the machine learning algorithm. The assessment of the proposed algorithm involved its performance comparison to state-of-the-art machine learning algorithms. A real-world dataset was generated to estimate the performance of the considered algorithms. The room data were collected every 5 min for 31 days during July 2022. The dataset contains 6 columns and 8,910 records from 6 sensors (timestamps, light, temperature, humidity, pressure, and altitude). Random Forest (RF), Decision Tree (DT), and ANN methods were compared with the proposed algorithm. The RF had the highest R2 value of 0.84 and the lowest Mean Square Error (MSE) of 0.43. The DT achieved an R2 score of 0.78, while the ANN achieved R2 score of 0.61, MSE of 1.04, and Mean Absolute Error (MAE) of 0.75. The proposed algorithm achieved an R2 of 0.69, MSE of 0.87, and MAE of 0.67.