## 3 Methodology
### Bayesian Optimization of LSTM Hyperparameters  
The process of building LSTM network models involves the determination of many hyperparameters, such as network depth, learning rate, batch size, and so on. The most intuitive way is to find the optimal parameters by manual trial and error, but the manual trial and error method is too inefficient. It lacks a certain exploration process, and the parameters can only be adjusted manually repeatedly for different problems and data. It takes a lot of time, and the final combination of model hyperparameters may not be optimal,which will affect the prediction of the model, including the degree of network fit and the generalization ability to the test set [43; 44]. Bayesian optimization, as a very effective global optimization algorithm, requires only a small number of iterations to obtain a desired solution by designing a proper probabilistic agent model and a payoff function [43; 44]. The main optimized hyperparameters and the range of values are shown in Table 1.  
The number of hidden units corresponds to the amount of information remembered between time steps (the hidden state). The hidden state can contain information from all previous time steps, regardless of the sequence length. If the number of hidden units is too large, then the layer might overfit to the training data. Epoch indicates the number of iterations of the data set during model training. If the number of iterations is set too large, the training time of the model is longer, resulting in overfitting of the model, over-reliance on training data, and poor prediction of unknown data, which makes the generalization ability of the model lower. If the number of iterations is set too small, it will make the model fit poorly and affect the prediction accuracy of the model. Size of the mini-batch to use for each training iteration is indicated, specified as the comma-separated pair consisting of 'MiniBatchSize' and a positive integer. A mini-batch is a subset of the training set that is used to evaluate the gradient of the loss function and update the weights. If the number of iterations is set too large, the training time of the model is long, causing the model to be overfitted and overly dependent on the training data. The prediction ability of the unknown data is poor, thus making the generalization ability of the model lower. If the number of iterations is set too small, it will make the model not fit well and affect the prediction accuracy of the model. The initial learning rate, \(\alpha\), is a relatively important hyperparameter in the LSTM model. When the learning rate is too large, it will cause the parameters to be optimized to fluctuate around the minimum value, thus skipping the optimal solution. When the learning rate is set too small, it will affect the convergence speed of the model, resulting in a slow convergence rate. In this paper, \(\alpha\) is set to 0.01 based on the empirical value. Dropout means that, during the training process of the model, for the network units, they are temporarily dropped from the network according to a certain probability. This hyperparameter plays a crucial role in preventing model overfitting and improving the generalization ability of the model. The key hyperparameters searched in this paper are data batch size, number of iterations, discard factor, and number of nodes in the hidden layer. The remaining hyperparameters are based on experience, the optimizer is selected as \"adam\", LearnRateSchedule is set to \"piecewise\", and the root mean square error is selected as the target loss function. The optimization of the LSTM network model hyperparameters using the Bayesian method is a five-step process as follows (Figure 3, the implementation of the whole process is implemented in matlab R2021b):  
Step 1: All data of six winter wheat phenological periods are normalized to divide the training set and validation set for parameter learning and model result validation of the training network model.