Results in Engineering (Sep 2024)
Advancing water quality assessment and prediction using machine learning models, coupled with explainable artificial intelligence (XAI) techniques like shapley additive explanations (SHAP) for interpreting the black-box nature
Abstract
Water quality assessment and prediction play crucial roles in ensuring the sustainability and safety of freshwater resources. This study aims to enhance water quality assessment and prediction by integrating advanced machine learning models with XAI techniques. Traditional methods, such as the water quality index, often require extensive data collection and laboratory analysis, making them resource-intensive. The weighted arithmetic water quality index is employed alongside machine learning models, specifically RF, LightGBM, and XGBoost, to predict water quality. The models' performance was evaluated using metrics such as MAE, RMSE, R2, and R. The results demonstrated high predictive accuracy, with XGBoost showing the best performance (R2 = 0.992, R = 0.996, MAE = 0.825, and RMSE = 1.381). Additionally, SHAP were used to interpret the model's predictions, revealing that COD and BOD are the most influential factors in determining water quality, while electrical conductivity, chloride, and nitrate had minimal impact. High dissolved oxygen levels were associated with lower water quality index, indicative of excellent water quality, while pH consistently influenced predictions. The findings suggest that the proposed approach offers a reliable and interpretable method for water quality prediction, which can significantly benefit water specialists and decision-makers.