## 4 Experimental Procedure and Analysis of Results
### Experimental Setup
#### 4.1.3 The Structures and Hyperparameters of LSTM-GARCH-Family Combined Models
To select the number of neurons, we first chose from \(\{2,4,8,16,32,64\}\) and then fine-tuned them in the appropriate interval to achieve the ideal state. Finally, 20 neurons were selected for the first LSTM layer and ten neurons for the second LSTM layer. * Parameter settings in GARCH For econometric models, we chose to use the GARCH, EGARCH, and PGARCH from the GARCH-family models. The error distributions were the Student's t distribution and the GED distribution. In \(\text{GARCH}(p,q,r)\), \(1\leq p\leq 3\), \(1\leq q\leq 2\), and \(r=0\). The results of the GARCH model with different parameters are shown in Table 5. According to the AIC, SC, and HQ criteria (the smaller the value, the better the model fit), the optimal GARCH model was selected among multiple \(\text{GARCH}(p,q,r)\) models. The rules for EGARCH and PGARCH model selection were the same. We finally chose the \(\text{GARCH}(1,1,0)\), \(\text{EGARCH}(1,1,1)\), and \(\text{PGARCH}(1,1,1)\) models by the GED distribution. Figure 5: 3D fitting diagram of LSTM’s performance with different numbers of batches and windows. The LSTM prediction model consisted of three basic modules: the input layer, the hidden layer, and the output layer. The key hyperparameters were set as shown in the hyperparameter settings section. In the LSTM model, the numbers of neurons in the two LSTM layers were 20 or 10, and the numbers of hidden nodes in the two fully connected layers were 5 and 1, respectively. A small batch of data with 40 points was selected for iterative training in this experiment. To avoid overfitting the data, dropout regularization was used, and the probability was set to 0.1 [49]. The garlic price of the last 50 days was selected to predict the garlic price of the next day. Meanwhile, [PERSON] was chosen and a learning rate of 0.001 was set to control the learning speed of the network. After 100 epochs, the model loss stopped decreasing and reached a state of convergence. GARCH-family single model prediction. In the part of parameter-setting discussion, we introduced how to choose the parameters of the GARCH-family models. Based on AIC, SC, and HQ criteria, we chose the GARCH (1, 1, 0), EGARCH (1, 1, 1), and PGARCH (1, 1, 1) models under the GED distribution. We could predict the garlic price through the established models. Meanwhile, the characteristic term coefficients of the GARCH-family models were derived. Single-combination model prediction. GARCH-family models were combined with an LSTM model to obtain LSTM-GARCH (LSTM-G), LSTM-EGARCH (LSTM-E), and LSTM-PGARCH (LSTM-P). The hyperparameters were the same as in the LSTM model, except that the number of LSTM-layer neurons changed slightly with the input dimensions. We tested the accuracy of different numbers of hidden nodes through many experiments to obtain the prediction results with the highest accuracy. According to the rules for selecting LSTM layer  
Figure 6: Performance comparison of LSTM with different numbers of batches and windows. (**a**) The performance of LSTM with varying numbers of windows when batches number is 40. (**b**) The performance of LSTM with varying batch size when windows number is 50.