Optimizing Machine Learning Models with Bayesian Techniques for Prediction of Groundwater Quality Index in Southwest Saudi Arabia
摘要
Due to improper waste disposal and unregulated industrial activities, the degradation and pollution of water resources in developing countries is serious. In Saudi Arabia, over-abstraction of groundwater due to limited natural freshwater resources coupled with industrial pollution and mining activities exacerbates the problems of water scarcity. This study aims to develop novel Bayesian optimized machine learning algorithms (MLAs) to identify the major pollutants and predict the groundwater quality index (WQI) in Al Qunfudah region, Saudi Arabia. The WQI was calculated using the entropy method and feature selection was performed using different techniques. Advanced MLAs such as ANN, RF and Gaussian Process Regression (GPR) were implemented using Bayesian optimization for WQI prediction. The explainable AI was used to calculate the SHAPley Additive ExPlanations (SHAP) value for three models. The study shows that WQI values in the region ranged from less than 100 to over 4000, indicating a significant problem with groundwater quality, with 74% of samples classified as unsuitable. Total dissolved solids (TDS) and electrical conductivity (EC) had the greatest influence on WQI, with correlation coefficients of 0.86 and 0.87, respectively. In addition, the RF model was particularly powerful with an R2 of 0.99 for training and 0.96 for testing and an RMSE of 86.1348 for training and 170.7915 for testing. The SHAP analysis identified EC, Zn, Cl, TDS and Cr as the most influential parameters impacting water quality, providing a solid basis for targeted mitigation strategies. This study uniquely combines the entropy method for WQI calculation with a comprehensive SHAP-based explainable AI approach, providing a deeper understanding of the key pollutants affecting groundwater quality. The study not only identifies critical parameters such as TDS and EC, but also provides a novel, data-driven framework for developing targeted mitigation strategies, which is particularly important for regions facing similar environmental challenges.