Multiclass and Ordinal Machine Learning for Surface Water Quality Classification to Support Sustainable Resource Management
Dmytro Tymoshchuk, Halyna Humeniuk, Andrii Sverstiuk
Key points
From the paper's conclusion- This study aimed to compare multiclass and ordinal classification in terms of accuracy, error patterns, and the quality of predicted probabilities.
Abstract
Reliable surface water quality monitoring can support sustainable water resource management and contribute to SDG 6 by helping identify locations that may warrant further investigation. Because WQI-based classes are ordered, evaluating the direction and magnitude of classification errors is relevant to interpreting monitoring results. This study aimed to compare multiclass and ordinal classification in terms of accuracy, error patterns, and the quality of predicted probabilities. A total of 1344 samples from four different water bodies in Ukraine (the Rika River, Lake Pisochne, and the Burulka and Leninsky ponds), subject to varying levels of anthropogenic and recreational pressure, were analyzed. Five water quality classes defined by WQI were predicted using pH and the concentrations of Ni, Co, Zn, Fe, Cu, and Mn. Eleven models were evaluated using repeated nested stratified cross-validation with 25 outer folds. Cumulative Ordinal XGBoost and Cumulative Ordinal CatBoost ranked highest by mean Accuracy, Macro-F1, and QWK, with values of 0.9818, 0.9788, and 0.9955 for XGBoost and 0.9817, 0.9786, and 0.9955 for CatBoost, respectively. The Nadeau–Bengio corrected test detected no statistically significant differences in Macro-F1, QWK, mean absolute class error, or severe error rate between the two ordinal models or between either the ordinal model and its multiclass counterpart. Most incorrect predictions differed from the true class by one level. No critical errors were recorded according to the criteria defined in the study. Cumulative Ordinal CatBoost had the lowest Multiclass Brier Score (0.0285) and ECE (0.0140), whereas the multiclass XGBoost model had the lowest Log Loss (0.0587). Permutation importance analysis showed that Co was the most important feature across all 11 models. In multiclass XGBoost, Cu had the highest mean absolute SHAP value for class III (Satisfactory), while pH ranked first for classes IV (Good) and V (Excellent). In Cumulative Ordinal XGBoost, pH also ranked first for P(Y > 4). Ablation analysis of the multiclass and ordinal XGBoost models showed the greatest performance decline after Co was removed. Evaluating error direction, probability calibration, and feature contributions alongside classification accuracy provides a basis for selecting models to support surface water quality monitoring. Validation on other water bodies and sampling periods is needed before using these models to guide monitoring decisions in new settings.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Robust water quality prediction across multiple indicator formulations using an explainable ensemble learning modelWater Resources and Industry · 2025
- Using machine learning models to predict the surface water quality index: a case study of the Cheffia dam (eastern Algeria)Frontiers in Earth Science · 2026
- Spatiotemporal water quality assessment of Xingqing Lake, China: Integrating water quality index, principal component analysis, and machine learning for SDG 6 reporting.Journal of environmental quality · 2026
- Machine learning for water quality prediction and uncertainty assessmentPhysics and Chemistry of the Earth Parts A/B/C · 2026
- Advanced machine learning models for accurate water quality classification and WQI prediction: Implications for aquatic disease risk managementThe Science of The Total Environment · 2025
- Inversion of Non-Optically Active Water Quality Parameters in Karst Mountain Reservoirs Based on Multi-Source Data: A Case Study of Pingzhai ReservoirApplied Sciences · 2026