An Optimized Hybrid XGBoost-LSTM-GRU Model for Energy Consumption Forecasting in Smart Homes using Weather Data
Abstract
Energy consumption is increasing every day due to the proliferation of smart homes and smart household appliances, which deplete existing energy resources. Therefore, efficient energy management by accurately predicting energy consumption is critical. In this paper, a hybrid prediction model is proposed to forecast energy consumption in smart homes using weather data. The proposed system follows five steps: data acquisition, data preprocessing, feature selection, prediction, and hyperparameter optimization. In the data acquisition step, all attributes except the weather attributes are removed. The min-max algorithm is then applied to normalize the dataset to a specific scale, preventing the prediction model from being affected by large dataset values in the data preprocessing step. A modified version of the Osprey algorithm is proposed to select the salient features that can be used as discriminative predictors of energy consumption. A two-stage ensemble prediction model is also proposed to forecast energy consumption within smart homes. The proposed prediction model consists of two stages: LSTM and GRU are used individually to predict energy consumption, and the results of these two algorithms are fed into XGBoost to make the final energy consumption prediction. Finally, Brown Bear Optimization is used to identify the optimal values for the hyperparameters in the LSTM, GRU, and XGBoost algorithms to enhance system performance. The proposed system is applied to a dataset from the Kaggle platform called smart home data. The results show that the proposed system outperforms baseline machine learning algorithms, achieving MSE, RMSE, and MAE values of 0.2320, 0.4817, and 0.3338, respectively.
Fields of Study & Subjects
Energy Load and Power Forecasting
Smart Grid Energy Management
Building Energy and Comfort Optimization
Publication details
- Journal / source
- MEJ Mansoura Engineering Journal
- Publisher
- Mansoura University
- Volume
- 51
- Issue
- 1
- Publication date
- 10 January 2026
- Language
- EN