A hybrid AI model integrating LSTM, XGBoost, and K-means for interpretable prediction and clustering of water quality in data-scarce regions
Prince Chukwuemeka, Okes Imoni, Felicia Chinwe Mogo, Desmond Rowland Eteh, Tarinabo William, Becky P. Bamiekumo, Francis Omonefe, Nelvin E. Agbozu, Omabuwa O. Mene-Ejegi, Obinna Ihekona, Charles U. Akajiaku, Mayen Ben-Koko
Abstract
Abstract Water quality degradation in data-scarce and pollution-prone regions such as the Niger Delta poses serious health and ecological risks. Traditional monitoring methods are limited by cost, temporal gaps, and lack of interpretability. This study develops a hybrid artificial intelligence (AI) framework integrating Long Short-Term Memory (LSTM), Extreme Gradient Boosting (XGBoost), and K-Means clustering for interpretable water-quality prediction and pattern discovery in under-monitored environments. The framework addresses the scarcity of temporal datasets by adapting LSTM to static physicochemical data through pseudo-sequential encoding, while XGBoost enhances regression and classification accuracy in small, heterogeneous samples. K-Means provides unsupervised insight into latent contamination clusters, complemented by Principal Component Analysis (PCA) for gradient-based visualization. Using 50 georeferenced samples from Yenagoa, Nigeria, ten key parameters were analyzed to compute the Water Quality Index (WQI). Results show that XGBoost achieved the highest predictive performance (R² = 0.95, AUC = 0.96), identifying iron, nitrate, and electrical conductivity as dominant drivers of poor water quality. Three chemically distinct clusters revealed spatial coherence with industrial and residential pollution zones, underscoring the region’s environmental vulnerability. The study demonstrates that hybridizing ensemble learning, deep networks, and clustering enhances both accuracy and interpretability in low-data contexts. By coupling supervised and unsupervised AI components, the proposed framework supports scalable, data-driven decision-making for water-resource management. Its transferability offers practical value for other developing regions facing similar data and infrastructure limitations, contributing to global Sustainable Development Goal 6 on clean water and sanitation.