Using machine learning to predict the groundwater quality index in Morocco’s Saïss shallow aquifer
摘要
Pollution is a serious problem that threatens most countries, including Morocco, especially the Saïss shallow aquifer. The development of new tools for monitoring and maintaining water quality is required. Based on the groundwater quality index, 60% of the samples fell into the poor quality class, primarily due to high nitrate levels. Calculating the groundwater quality index (GWQI) using the traditional approach is generally laborious and prone to errors. This study, conducted in the shallow Saïss aquifer, aimed to develop a sophisticated method for estimating the GWQI and to determine the most accurate prediction models that yield the highest accuracy with the fewest indicators using two machine learning models (random forest and deep learning). Temperature, pH, nitrites, nitrates, mineralization, and microorganisms were used as explanatory variables, with groundwater quality index as the dependent variable for the period from 2012 to 2017. The performance of the GWQI prediction model was assessed using the root mean square error (RMSE), the correlation coefficient (R2), Nash Sutcliffe Efficiency (NSE), and the Wilmott index. The deep learning model demonstrated better accuracy than the random forest, with an RMSE of 1.4, R2 of 0.98, NSE of 0.99, and Wilmott index of 0.99 on the test dataset. To predict groundwater quality with minimal data, a scenario with highly influential parameters (nitrate, microorganisms, and temperature) was tested using a deep learning model. The high accuracy (RMSE of 1.98, R2 of 0.96, NSE of 91, and Wilmott index of 0.95 for the test dataset) demonstrates that GWQI can be predicted using reduced water quality indicators, particularly when time or financial constraints limit data availability. Using this model, water managers can better monitor groundwater. The sources of nitrate pollution must be identified and continuously monitored to maintain groundwater quality and minimize pollution.