Stochastic Grey Wolf Optimization for Hyperparameter Tuning of LSTM and RNN Models in Energy Forecasting

O Omsaeed Ahmed Albser M Mourad R. Mouhamed S Salma A. Shatta N Nasser H. Sweilem A Ashraf Darwish

Abstract

Abstract Accurate photovoltaic (PV) power forecasts are required to support the stable and efficient incorporation of solar power into modern electric power grids. Even though the use of recurrent neural network models such as RNNs and LSTMs for time series forecasting has proven successful, these model’s ability to make accurate predictions is heavily influenced by proper hyper parameter selection. Therefore, the goal of this research is to introduce a stochastic grey wolf optimizer (SGWO) based hyper-parameter optimization system for RNN and LSTMs used for predicting PV power. A stochastic grey wolf optimizer will be added to the basic grey wolf optimizer to enhance the search capabilities of the algorithm. This new stochastic grey wolf optimizer introduces randomness into the optimization process which can help prevent premature convergence and increase exploration within the problem space. The performance of the proposed SGWO-based system will be tested on a real world PV data set. The comparison will include results from manual tuning, random searching, and standard GWO. Performance metrics will consist of root mean squared error (RMSE), mean absolute error (MAE), and coefficient of determination (R2) and will be used to evaluate how well each of the algorithms performed when making out-of-sample predictions. Results from testing showed that the SGWO-LSTM configuration produced the highest total out-of-sample prediction accuracy; MAE = 0.018, RMSE = 0.041, R 2  = 0.978.

Article Details

Volume / Issue Vol. 16, Issue 1
Published June 13, 2026
ISSN 2045-2322
Publisher Nature Portfolio

Journal Info

Scientific Reports

Nature Portfolio

ISSN: 2045-2322 Open Access Life Sciences

Authors (5)

O

Omsaeed Ahmed Albser

M

Mourad R. Mouhamed

S

Salma A. Shatta

N

Nasser H. Sweilem

A

Ashraf Darwish