Evaluation of machine learning models in the prediction of water quality index for selected water sources in Uyo, Akwa Ibom State, Nigeria
摘要
Traditional assessment of water quality using the Water Quality Index (WQI) is often labor-intensive, costly, and time-consuming. The integration of Machine Learning (ML) models offers a promising alternative for fast and accurate WQI prediction. This study evaluated the performance of six regression-based ML algorithms: Extra Trees Regression (ETR), Gradient Boosting Regression (GBR), Multi-Layer Perceptron (MLP), K-Nearest Neighbours (k-NN), LassoLarsCV, and Ridge Regression in predicting the Groundwater Quality Index (GWQI) for selected water sources across Ikono, Oku, Etoi, and Offot Clans in Uyo Local Government Area, Akwa Ibom State, Nigeria. Groundwater samples were collected from sixty (60) borehole locations over twelve months (January–December 2025) and analyzed for thirteen physicochemical parameters: pH, temperature, electrical conductivity (EC), total dissolved solids (TDS), dissolved oxygen (DO), biochemical oxygen demand (BOD), alkalinity, acidity, total hardness, chloride (Cl–), sulphate (SO42–), phosphate (PO43–), and nitrate (NO3–). GWQI was computed using the Weighted Arithmetic Water Quality Index (WAWQI) method, yielding values ranging from 27.21 to 86.81. Classification of results showed that 35% of samples fell within the good water quality class, 48.3% within the poor class, and 16.7% within the very poor class, indicating that the majority of groundwater sources in the study area require treatment before consumption. The experimental dataset of 714 unique observations was partitioned into 80% training and 20% testing subsets for ML model development and validation. Model performance was assessed using the Coefficient of Determination (R2), Root Mean Square Error (RMSE), and Mean Absolute Error (MAE). The LassoLarsCV model demonstrated superior predictive performance (R2 = 1.0000, RMSE = 0.00, MAE = 0.00), outperforming all other models, including Ridge Regression (R2 = 0.9999), Gradient Boosting Regression (R2 = 0.9920), Extra Trees Regression (R2 = 0.9848), MLP (R2 = 0.9673), and k-NN (R2 = 0.9516). Five-fold cross-validation further confirmed the robustness and consistency of the LassoLarsCV model. These findings demonstrate the efficacy of ML algorithms, particularly LassoLarsCV, as reliable and cost-effective tools for GWQI prediction, with significant implications for water resources management and public health protection in Akwa Ibom State, Nigeria.