Evaluation and Prediction of Raw and Treated Water Quality Using Conventional Water Quality Index Approach and Machine Learning Models for Rawal Lake, Pakistan
摘要
Water quality in freshwater bodies is increasingly at risk due to organic and inorganic pollutants originating from industrial discharges, untreated sewage disposal, agriculture runoff, and urban stormwater runoff. The Water Quality Index (WQI) deserves as a critical metric for assessing the overall status of water systems. This study presents a data-driven approach to model and predict WQI, using four machine learning (ML) algorithms: Multiple Linear Regression (MLR), Artificial Neural Networks (ANN), Random Forest (RF), and Extreme Gradient Boosting (XGB). Unique dataset comprising raw water (RW) and treated water (TW) quality parameters from Rawal Lake (Islamabad, Pakistan) was used to train and validate the models. Model performance was evaluated using multiple statistical indicators including the coefficient of determination (R²), root mean squared error (RMSE), mean absolute error (MAE), and mean square error (MSE). Accuracy indicators of the MLR model for RW are better than XGB, ANN, and RF models, yielding the highest R2 (1.000), minimum RMSE, MAE, and MSE values (0.03, 0.02, and 0.00, respectively). Similarly, in the case of TW, MLR outperformed other ML models with R2 =1.000, RMSE = 0.000, MAE = 0.000, and MSE = 0.000. The study demonstrates the utility of ML models, particularly simpler, interpretable models like MLR, for reliable water quality forecasting in data-constrained settings. These insights can support timely decision making and resources optimization for sustainable water quality management.
Graphical AbstractAccording to the graphical illustration, this paper examines the prediction of Water Quality Index (WQI) in Rawal Lake (Islamabad, Pakistan) where industrial effluents, untreated sewage, agricultural runoffs, and urban stormwater inflows are increasingly straining the water resources of the lake. Nine years of water quality data (2016–2024) of physicochemical parameters such as pH, turbidity, alkalinity, hardness, electrical conductivity (EC), calcium (Ca), total dissolved solids (TDS), chlorides (Cl), dissolved oxygen (DO), and fecal coliform were compared in the raw water (RW) versus treated water (TW) dataset. The results of classification revealed that RW quality was between poor and unsuitable, and TW quality also improved significantly, between good and excellent, which proves the efficiency of the treatment procedures. Four machine learning (ML) algorithms, Multiple Linear Regression (MLR), Artificial Neural Networks (ANN), Random Forest (RF), and Extreme Gradient Boosting (XGB) were used to model and predict WQI dynamics. Statistical performance measures including coefficient of determination (R2), root mean squared error (RMSE), mean absolute error (MAE), mean square error (MSE) and percent relative error index (PREI) were all strictly employed to assess model performance. The findings showed that MLR was always more effective than a more complex model, with almost perfect predictive accuracy (R2 = 1.000 in RW and 1.000 in TW) and the lowest value of error. Such results indicate that the dynamic process of water quality can be accurately described in a simple and interpretable model, which can be an effective tool in making decisions in time, allocating resources efficiently, and managing water resources sustainably in freshwater environments under threat.