# Application of Artificial Intelligence to Forecast Drought Index for the Mekong Delta
## 3 Results
### Results of Evaluating Machine Learning Models  
This study established four models for the SPEI-1, SPEI-3, SPEI-6, and SPEI-12 indices using the BMA to predict only the SPEI. The models were developed based on various time periods and included ARIMA, Gradient Boosting (GB), Extreme Gradient Boosting (XGBoost), Recurrent Neural Networks (RNNs), and Long Short-Term Memory (LSTM). Table 3 displays the outcomes of the hyperparameter-tweaking process. \begin{table}
\begin{tabular}{c c c} \hline
**No.** & **Model Name** & **Hyperparameter Tuning** \\ \hline \multirow{4}{*}{1} & & ARIMA(3,1,1) (1,0,1) [13] \\  & ARIMA & p = 3; d = 1; q = 1 \\  & & P = 1; D = 0; Q = 1 \\  & & s = 12 \\  & & Distribution = “Gaussian”. \\  & & cv.folds = 10: \\
2 & Gradient Boosting (GB) & shrinkage parameter = 0.01. \\  & & Each terminal node should have at least 10 observations: n.minobsinnode = 10. \\  & & n.trees = 1000. \\  & eXtreme Gradient Boosting & The number of trees (nround = 1000); \\
3 & eXtreme Gradient Boosting (XGBoost) & The shrinkage parameter \(\lambda\) (eta in the params): 0.01; \\  & & The number of splits in each tree: max.depth = 5. \\  & & - learning\_rate = 0.001 \\  & Recurrent Neural Networks & - epochs = 1000 \\
4 & (RNNs) & - activation = ’relu’ \\  & & - optimizer = ’adam’ \\  & & - learning\_rate = 0.001 \\  & & - epochs = 1000 \\  & & - batch\_size = 32 \\  & & - validation\_split = 0.2 \\
5 & Long Short-Term Memory (LSTM) & - verbose = 1 \\  & & - activation = ’relu’ \\  & & optimizer = ’adam’ \\  & & loss = ’mean\_squared\_error’ \\ \hline \end{tabular}
\end{table} 
Table 3: Table of results of hyperparameter tuning. Figure 5: Models selected by BMA (Bayesian Model Averaging). The table provides information about hyperparameter tuning for five different models. Every model possesses distinct hyperparameters that have been established or adjusted. The ARIMA model includes parameters for autoregressive (p), differencing (d), and moving average (q) components, as well as seasonal components. The machine learning models such as Gradient Boosting and XGBoost possess parameters associated with the quantity of trees, learning rate (shrinkage), and tree depth. The neural network models, specifically the Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM), are characterized by several adjustable parameters, including the learning rate, number of epochs, batch size, and activation functions. The SPEI is calculated at different timescales (1, 3, 6, and 12 months) to capture short-term and long-term drought conditions (for six prediction steps). The forecast results for SPEI-1, SPEI-3, SPEI-6, and SPEI-12 are presented in Figures 6-10 along with a comparison chart illustrating the discrepancy between the predicted and computed SPEI values for the test data. The performance of each model was assessed using four evaluation metrics: the Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), coefficient of determination (R2), and Mean Absolute Percentage Error (MAPE). These metrics are commonly used in regression analysis to quantify the accuracy, precision, and goodness-of-fit of the predictive models. Table 4 shows the results of the evaluation of the machine learning models (based on the four criteria) to predict the SPEI (for six prediction steps) in the study area (Table 4). Figure 6: Comparison chart displaying the forecasted and actual SPEI values of the ARIMA model, with a prediction horizon of 6 steps. Figure 8: Comparison chart displaying the forecasted and actual SPEI values of the eXtreme Gradient Boosting model, with a prediction horizon of 6 steps. Figure 7: Comparison chart displaying the forecasted and actual SPEI values of the Gradient Boosting model, with a prediction horizon of 6 steps. Figure 10: Comparison chart displaying the forecasted and actual SPEI values of the LSTM model, with a prediction horizon of 6 steps. Figure 9: Comparison chart displaying the forecasted and actual SPEI values of the RNN model, with a prediction horizon of 6 steps.