Abstract:To address the problem of numerous hyperparameters, loss of long time series information and difficulty in distinguishing primary and secondary features in long short-term memory network (LSTM) for grain capacity prediction, so this paper proposed a data-driven grain capacity portfolio forecasting model. In the hyperparameter part, it performs hyperparameter search for LSTM by introducing dynamic weights and Laplace variants of the bald eagle algorithm (WLBES), avoiding the process of manual tuning of parameters; In the prediction part, it uses Ridge Regression (RR) to correct the residuals of the prediction results to make up for the deficiency of LSTM data loss; at the same time, it adds an attention mechanism to distinguish primary and secondary features by weight size to enhance the importance of features with greater relevance to food production. The results showed that the combined WLBES-LSTM-RR model decreased the root mean square error by 75% and 19% compared with the LSTM and WLBES-LSTM models, respectively, and a substantial decrease in RMSE compared with other combined models optimized for LSTM. This combined model has higher prediction accuracy in grain capacity prediction.