# Field Data Forecasting Using LSTM and Bi-LSTM Approaches
## 3 Results
### Results and Discussion  
The performance of our model was assessed using the Sklearn Python library [28], as well as the Root Mean Square Error (RMSE) and K-Fold cross-validation score after dividing the data into five subsets, as described in Section 2.1. We trained our model with 100 epochs of various settings and hyperparameters. In this section, we report the forecasting model's training and validation results based on the data we collected and preprocessed. The different learning rates and split ratios are divided into 12 cases, as shown in Table 5. Figures 4 and 5 show the comparison results for the different cases (LSTM model and Bi-LSTM model) in order to compare the best results. Figures 4 and 5 compare error results for our LSTM and Bi-LSTM models at different learning rates and split ratios. In cases 5 to 10 (the red box in Figure 4), the values of  
Figure 4: Error results comparison of the Soil Moisture value forecasting in different cases of learning rate (LR) and split ratio (SR)—LSTM model. Figure 5: Error results comparison of the Soil Moisture value forecasting in different cases of learning rate (LR) and split ratio (SR)—Bi-LSTM model. training error, test error, and RMSE validation error are quite low, indicating that the models perform well. When the LSTM model is compared to six cases (cases 5-10), case 5 has a lower train error, test error, and RMSE validation than the others, indicating that the LSTM model's training performance is a 0.03% error, a 0.08% error, and a 1.057% RMSE error. A comparison of the Bi-LSTM model across six cases shows that case 7 (the yellow box in Figure 5) has a lower train error, test error, and RMSE validation than the others (cases 5 to case 10). This means that the Bi-LSTM model has a training error of 0.03%, a testing error of 0.04%, and a model validation error of 0.783%. As shown in Case 5, the appropriate learning rate and split ratio values for the LSTM model are 0.001, 70% (for training), and 30%, respectively (for testing); see the yellow box in Figure 4. The appropriate learning rate and split ratio values for the Bi-LSTM model are 0.0001 and 70% (for training) and 30% (for testing), respectively, as shown in case 7 (see the yellow box in Figure 5). Following the selection of appropriate learning rate and split ratio values, the prediction model is tested with different time intervals that include forecasting for the next 12 h, 8 h, 6 h, 4 h, 3 h, 2 h, 1 h, and 30 min, with the error results shown in Figures 6 and 7. Figures 6 and 7 show the error results of forecasting soil moisture values over different time intervals using the LSTM and Bi-LSTM models, respectively. The LSTM model is expected to perform well in the next hour, with a training error rate of 0.03%, a testing error rate of 0.06%, and a validation error rate of 0.024% (see the red box in Figure 6). In  
Figure 6: Comparison error results of the Soil Moisture value forecasting in different time intervals (LSTM model). Figure 7: Comparison error results of the Soil Moisture value forecasting in different time intervals (Bi-LSTM model). contrast, the Bi-LSTM model is expected to perform well in the next 30 min, with a training error of 0.01%, a testing error of 0.02%, and a validation error of 0.515% RMSE (see the red box in Figure 7). As a result, the soil moisture forecasting model with LSTM and Bi-LSTM models is chosen for the next 1 h and 30 min, as shown in Figures 8 and 9. Figures 8 and 9 illustrate the results of forecasting soil moisture values for the next hour (LSTM model) and 30 min (Bi-LSTM approach). When compared to measurements and soil moisture value forecasting, the results in Figures 8 and 9, both models perform well in predicting soil moisture value, with approximately 0.06% and 0.15% of soil moisture value error predicted using the LSTM and Bi-LSTM models, respectively.