# Assessing Nitrate Contamination Risks in Groundwater: A Machine Learning Approach
## 3 Results and Discussions
### Groundwater Contamination Incidence Probability Mapping  
This research focuses on assessing the probability of groundwater nitrate contamination occurrence utilizing machine learning (ML) techniques such as SVM, BRT, and MDA. An ensemble modeling approach is applied for the production of groundwater contamination incidence probability mapping. There are a total of eight dependent factors that are analyzed and utilized in the current study. These datasets were used in the proportion of 70:30 to train and validate the three ML techniques practiced in this research, respectively. In order to produce an effective groundwater contamination incidence probability map, all the models were taken through calibration trials to achieve a minimum AUC value of 80%. Table 3 indicates the model performance values for the prediction of the groundwater contamination incidence. The AUC values of different models varied from 0.82 to 0.86, with SVM being the most superior to the others. However, the corresponding AUC value for the ensemble model was 0.87. Being a reliability metric, the Kappa statistic ensured that the chance occurrence was minimized to zero for the good model presentation (0.55 < K < 0.85) [93]. Table 3 demonstrates that the groundwater contamination probability maps were produced when all the models attained the threshold level of the AUC value. Among all of the models, the SVM model showed better performance as per the values of evaluation measures, including AUC, Kappa, and mean square error (AUC = 0.86, Kappa = 0.85, and MSE = 0.22). In the comparison of BRT (AUC = 0.85, Kappa = 0.84 and MSE = 0.22) and MDA (AUC = 0.82, Kappa = 0.81 and MSE = 0.19), BRT produces more efficient results than MDA. However, the ensemble techniques produce considerably better results than SVM, BRT, and MDA, as shown in Table 3 (AUC = 0.87, Kappa = 0.86, and MSE = 0.18). Moreover, the variance and mean of all of the models are represented in Table 4. The variance of BRT and ensemble models (0.04 and 0.05, respectively) is considerably less than the variance of MDA and SVM models (0.09 and 0.08, respectively), as depicted in Table 4. The mean of the MDA model is also relatively greater than the other models (0.55). However, after the MDA model, the mean is greater for the ensemble model, followed by BRT (0.48) and SVM (0.47), as shown in Table 4.  
The groundwater contamination incidence probability maps were produced using the practiced models after achieving 80% accuracy. The produced maps are shown in Figure 5(a-d). All of the maps show that the southern lower part of the study area has the most probability of groundwater contamination incidence. The regions on the northern side, where the elevation is low and the population is very scarce and widely distributed, have a low probability of groundwater contamination incidence. In all the contamination incidence maps, the regions of high probability have relatively low elevation and vegetation, a high drainage density, and agricultural and urbanization levels. \begin{table}
\begin{tabular}{c c c} \hline \hline
**ML Models** & **Mean** & **Variance** \\ \hline BRT & 0.48 & 0.04 \\ SVM & 0.47 & 0.08 \\ Ensemble & 0.51 & 0.05 \\ MDA & 0.55 & 0.09 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance of models during testing datasets. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**ML Models** & **AUC** & **Kappa** & **MSE** \\ \hline BRT & 0.85 & 0.84 & 0.22 \\ SVM & 0.86 & 0.85 & 0.21 \\ Ensemble & 0.87 & 0.86 & 0.18 \\ MDA & 0.82 & 0.81 & 0.19 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Groundwater risk prediction map mean and variance values for models. The considerably non-efficient performance of the MDA model is due to the normal data algorithm being processed under the parametric routine, rather than through processing the nonlinear relationship amongst the variables [94]. Similarly, the non-parametric procedures, namely BRT and SVM, can analyze the nonlinear relationships of the data flow and produce considerably efficient results.