# Assessing Nitrate Contamination Risks in Groundwater: A Machine Learning Approach
###### Abstract  
Groundwater is one of the primary sources for the daily water requirements of the masses, but it is subjected to contamination due to the pollutants, such as nitrate, percolating through the soil with water. Especially in built-up areas, groundwater vulnerability and contamination are of major concern, and require appropriate consideration. The present study develops a novel framework for assessing groundwater nitrate contamination risk for the area along the Karakoram Highway, which is a part of the China Pakistan Economic Corridor (CPEC) route in northern Pakistan. A groundwater vulnerability map was prepared using the DRASTIC model. The nitrate concentration data from a previous study were used to formulate the nitrate contamination map. Three machine learning (ML) models, i.e., Support Vector Machine (SVM), Multivariate Discriminant Analysis (MDA), and Boosted Regression Trees (BRT), were used to analyze the probability of groundwater contamination incidence. Furthermore, groundwater contamination probability maps were obtained utilizing the ensemble modeling approach. The models were calibrated and validated through calibration trials, using the area under the receiver operating characteristic curve method (AUC), where a minimum AUC threshold value of 80% was achieved. Results indicated the accuracy of the models to be in the range of 0.82-0.87. The final groundwater contamination risk map highlights that 34% of the area is moderately vulnerable to groundwater contamination, and 13% of the area is exposed to high groundwater contamination risk. The findings of this study can facilitate decision-making regarding the location of future built-up areas properly in order to mitigate the nitrate contamination that can further reduce the associated health risks. groundwater; machine learning; contamination risk mapping; policymaking; nitrate contamination +
Footnote †: journal: Applied Sciences  
**Authors**  
**1**: _Applied_  
**2**: _Science_  
**3**: _Applied_  
the global population consumes groundwater for various purposes, including agricultural, domestic, and industrial [4]. Several chemicals, including nitrate, can infiltrate the soil, and potentially pollute groundwater [5; 6; 7]. Therefore, safe drinking water supplies and deteriorating groundwater quality are key issues all over the globe [8]. The associated groundwater vulnerability and contamination risk valuation are essential for groundwater contamination mitigation [9]. Groundwater is the biggest source of drinking water in most developing countries, including Pakistan. Various risks are associated with this, ranging from basic perceptions to detailed impacts that are assessed and managed in various ways [10; 11; 12; 13]. Employment and economic growth in Pakistan are primarily centered on agriculture. Gross domestic product (GDP) receives a substantial portion from agriculture and the associated industries [14]. Groundwater, a high source of water consumption in Pakistan, is polluted by various contaminants. Permeability of various substances through the soil, including nitrate concentrations, can hypothetically pollute the groundwater [5; 6; 7]. Positioned below the agricultural surface, nitrogen is the primary source of nitrate concentrations and associated water contaminations. Water acts as a carrier through the soil, as it can form a mixture with nitrate concentrations, and help it to reach the groundwater table. These nitrates can exist in a groundwater table for an extended time period, considering the continuous yearly nitrogen supply to the land surface [15]. A hydrogeochemical profile of higher fluoride (F-) in groundwater was examined in a study of Dragai in northern Pakistan by [PERSON] et al. [16], and it was found that fluorite is the primary source of F-contamination in groundwater. [PERSON] and [PERSON] [17] examined the physicochemical characteristics in the Gilgit and Hunza rivers, in northern Pakistan. The analytical outcomes of the collected samples showed a high concentration of bicarbonate in the water.