Seasonal water quality index prediction in Guilin karst water system: an explainable machine learning approach
Accurate prediction of the water quality index (WQI) in karst water systems remains challenging due to pronounced seasonal hydrological heterogeneity, dual-porosity flow regimes, and complex multi-factor pollution mechanisms. This study developed a season-stratified, explainable machine-learning framework for the Guilin karst water system (Guangxi, China), based on 208 samples from 104 stations covering the wet (June to August) and dry (December to February) seasons. A sample-adaptive feature engineering step, followed by a three-stage selection pipeline (Pearson correlation filtering, variance inflation factor (VIF) screening, and Random Forest importance ranking), reduced 16 candidate features to ten predictors per season. Ten base learners (Ridge, Lasso, ElasticNet, support vector regression (SVR), random forest (RF), gradient boosting (GBM), eXtreme gradient boosting (XGBoost), light gradient boosting machine (LightGBM), categorical boosting (CatBoost) and adaptive boosting (AdaBoost)) were trained separately for each season, and the top three per season were stacked through a regularised Ridge meta-learner. XGBoost performed best in the wet season (R 2 = 0.9655, RMSE = 3.0938, MAE = 2.6754); the Stacking ensemble performed best in the dry season (R 2 = 0.9785, RMSE = 2.9142, MAE = 2.4278), beating every individual learner. regression receiver operating characteristic (RROC) analysis confirmed these rankings via the Area Over the Curve (|AOC|) and exposed a cross-seasonal inversion: ensemble models improved from wet to dry season (|AOC| ratio 0.45–0.54), while linear baselines worsened by a factor of 4.1 to 4.3, supporting season-specific model selection. SHAP analysis showed a clear seasonal shift in the dominant drivers. NH 3 –N controlled wet-season WQI (53.47% importance); in the dry season, control was shared by NH 3 –N (26.00%), TN (25.09%), DO (21.29%) and the pollution-load index (20.19%), and total phosphorus dropped from 7.73 to 0.06%, reflecting carbonate-mediated sequestration specific to karst. The framework offers a transferable, interpretable template for season-aware WQI modelling in monsoonal subtropical karst settings and provides a practical basis for season-differentiated pollution control.
Authors
- Sze–Mun Lam (ORCID: https://orcid.org/0000-0001-5118-8144)
- Jin–Chung Sin (ORCID: https://orcid.org/0000-0002-1177-5894)
- Kun Dong (ORCID: https://orcid.org/0000-0003-3030-7962)
- Jiayu Yang (ORCID: https://orcid.org/0000-0001-5102-1002)
- Haixiang Li
- Dunqiu Wang
- Yang Huang
Institutions
- Guilin University of Aerospace Technology (CN)
- Guilin University of Technology (CN)
- Guilin University of Electronic Technology (CN)
- Universiti Tunku Abdul Rahman (MY)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-06-19
- DOI
- https://doi.org/10.1038/s41598-026-55212-6
- Primary Topic
- Karst Systems and Hydrogeology
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China
- Natural Science Foundation of Guangxi Province
- Guangxi Key Research and Development Program