## 4 Experimental Procedure and Analysis of Results
### Experimental Setup
#### 4.1.3 The Structures and Hyperparameters of LSTM-GARCH-Family Combined Models  
To illustrate the effectiveness and necessity of the combined models, we first used the GARCH-family models (GARCH, EGARCH, PGARCH) and the LSTM alone for garlic price prediction separately. Second, to find the optimal combined model for garlic price prediction, we combined the LSTM model with the GARCH-family models, and the structures of the combined model are shown in Section 3.3.3. Finally, we compared the performances of the above prediction models to obtain the optimal garlic price prediction model. It summarizes the input layer variables of the single models and the combined models in Table 4. The GARCH terms, EGARCH terms, and PGARCH terms denote the corresponding parameters extracted from the GARCH-family models which were used as inputs to the combined models. In addition, the explanatory variable in Table 4 is the daily price series of garlic, and the symbol \"\(\surd\)\" denotes input variables in the models. The choice of parameters is crucial to the prediction performance of the LSTM-GARCH-family combined models. The parameters of the LSTM-GARCH models consisted of two main components. The hyperparameters were used in the LSTM, and the statistical parameters were used to fit the economic model GARCH. To obtain the optimal prediction performances of the models, we iteratively adjusted the parameters of the model. The following was the parameter tuning process for the two types of models used in our experiments. * Hyperparameter settings in LSTM For deep-learning models, prediction performance is highly dependent on the choice of hyperparameters. Since the hyperparameter space is large and cannot be fully traversed, we used empirical tuning to get the hyperparameters with good performances for the selected dataset. The essential hyperparameters, such as learning rate, batch \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **MODEL** & \begin{tabular}{c} **Explanatoty** \\ **Variable** \\ \end{tabular} & \begin{tabular}{c} **GARCH** \\ **Param** \\ \end{tabular} & \begin{tabular}{c} **EGARCH** \\ **Param** \\ \end{tabular} & \begin{tabular}{c} **PGARCH** \\ **Param** \\ \end{tabular} \\ \hline \begin{tabular}{c} Single model \\ Single-combination \\ model \\ \end{tabular} & LSTM-G & \(\surd\) & & & & \\ \begin{tabular}{c} LSTM-G \\ LSTM-E \\ LSTM-P \\ \end{tabular} & \(\surd\) & \(\surd\) & & & \\ \begin{tabular}{c} LSTM-E \\ LSTM-P \\ \end{tabular} & \(\surd\) & & & & \(\surd\) \\ \
\begin{tabular}{c} Dual-combination \\ model \\ \end{tabular} & LSTM-GE & \(\surd\) & \(\surd\) & \(\surd\) & \\
\begin{tabular}{c} LSTM-GP \\ LSTM-EP \\ model \\ \end{tabular} & \(\surd\) & & & \(\surd\) & \(\surd\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Input-layer variables of each model. size, sliding window size, and the number of LSTM neurons, significantly influenced the model's performance when building the model. For the hyperparameters selected for LSTM, we used MSE as the loss function. In addition, Adam was used as an optimizer, which combines the advantages of AdaGrad and RMSProp, including fast convergence and small memory requirements [48]. For the learning rate setting, due to the learning rate being set to 0.001, the model converged faster and the accuracy was higher. We set the learning rate to 0.001. The computational time of the model was about 219.4s. For the values of batches and windows hyperparameters, we set the initial batches to \(\{16,24,40,64,128\}\) and windows to \(\{10,25,50,75,100\}\). Next, we performed combined optimization of batches and windows. Figure 5 shows the results of the corresponding hyperparameter configurations; the final values of batches and windows were set to 40 and 50. In addition, we use Figure 6 to show the performance of LSTM with varying window values when the initial batch value is 40. We use Figure 6 to show the performance of LSTM with varying batch values when the initial window's value is 50.