# Field Data Forecasting Using LSTM and Bi-LSTM Approaches
## 2 Materials and Methods
### Modeling and Pattern Selection
#### 2.3.2 Hyperparameters Selection
Based on our empirical study, the learning rate has a significant impact on the model's performance and results. As a result, we conducted a more detailed analysis to determine the best values for this parameter based on various training/testing data split ratios. During the model's training phase, the learning rate is a ratio that is applied to the model error. Selecting the learning rate is difficult because a too-low value may impact the long process of training, which becomes stuck, whereas a too-high value may result in a suboptimal set of weights learning too quickly or in an unstable process of training. The split ratio specifies how the dataset was split into training and testing. To select the appropriate case of the forecast model, 12 cases with different values of learning rate and split ratio are shown in Table 6. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Case** & **Learning Rate (LR)** & **Split Ratio (SR)** & **Case** & **Learning Rate (LR)** & **Split Ratio (SR)** \\ \hline
1 & 0.1 & 70\% (train), 30\% (test) & 7 & 0.0001 & 70\% (train), 30\% (test) \\ \hline
2 & 0.1 & 80\% (train), 20\% (test) & 8 & 0.0001 & 80\% (train), 20\% (test) \\ \hline
3 & 0.01 & 70\% (train), 30\% (test) & 9 & 0.00001 & 70\% (train), 30\% (test) \\ \hline
4 & 0.01 & 80\% (train), 20\% (test) & 10 & 0.00001 & 80\% (train), 20\% (test) \\ \hline
5 & 0.001 & 70\% (train), 30\% (test) & 11 & 0.000001 & 70\% (train), 30\% (test) \\ \hline
6 & 0.001 & 80\% (train), 20\% (test) & 12 & 0.000001 & 80\% (train), 20\% (test) \\ \hline \hline \end{tabular}
\end{table} 
Table 6: List of 12 different cases of learning rates and split ratios to define the suitable values of the proposed model. Figure 3: Proposed model architecture. \begin{table}
\begin{tabular}{|c|c|c|c|c|} \hline \hline  
There are, however, a number of hyperparameters that are critical to the performance of the proposed forecasting model. This paper will focus on optimizing the learning rate (LR) and split ratio (SR) to improve the proposed model performance. 1. The learning rate (LR) is one of the hyperparameters that controls the change in the model in response to the estimated error each time the weights of model are updated;
2. The split ratio (SR) is the split interval of the dataset for training and testing. Table 6 divides the various learning rates and split ratios into 12 cases. The model's performance is compared using these numerous cases. The total number of dataset samples used to test and train the forecasting model is 17,749 samples. The split ratios are divided into two categories. The first case is composed of 70% training data, which equates to 12,424 samples of the total dataset, and 30% testing data, which equates to 5325 samples of the total dataset. The second case involves 80% training data equaling 14,200 samples of the total dataset and 20% testing data equaling 3549 samples of the total dataset. Table 6 displays the values for the learning rate and split ratio. To determine the appropriate values of learning rate and split ratio for the proposed model, we must test and compare these cases. The learning rate ranges from 0.1 to 0.000001, and its value influences the training error of the proposed model. Furthermore, the split ratios are divided into two groups: 70% for training and 30% for testing in one setup, and 80% for training and 20% for testing in the other. The next hyperparameters that we tweaked were the number of time steps and the time interval. The number of time steps is a critical hyperparameter for LSTM models. It is the number of observations required by the model as input to make a future prediction. The time interval is the amount of time that elapses between the last time step in the input and the predicted future. Table 7 shows the effect of time steps and time interval values on the soil moisture validation graph. The appropriate time interval for the proposed forecasting model is also chosen when defining the appropriate time interval to forecast the next soil moisture value.