DOI: 10.2166/wqrj.2026.077 ISSN: 2709-8044

Enhancing surface water quality classification through machine learning

Hayal Boyacıoğlu, Hülya Boyacıoğlu

ABSTRACT

Graphical abstract illustrating the study workflow for ecological water quality classification using machine learning, including water quality data collection, preprocessing, ecological water quality assessment, model development, performance evaluation, and prediction of water quality classes.

Reliable assessment of river basin water quality is fundamental for ecosystem protection and sustainable resource management. Conventional index-based approaches provide standardized evaluations but are limited in predictive capacity. This study addresses this limitation by classifying water quality based on selected parameters using Machine Learning (ML) methods integrated with the Ecological Water Quality Index (EWQI) framework. The dataset from the Küçük Menderes River basin outlet included nitrate nitrogen, ammonium nitrogen, dissolved oxygen, chloride, and sulfate observations. Logistic Regression (LR) and Random Forest (RF) models were applied to classify water quality into EWQI classes (A–G). Results showed that the RF model achieved 80.6% accuracy, outperforming LR (76.1%), with Kappa statistics of 0.74 and 0.68, respectively, indicating substantial agreement between predicted and observed classifications. Variable importance analysis identified nitrate-nitrogen as the most influential parameter and chloride as the least. By capturing nonlinear interactions among parameters, the ML framework enhances classification accuracy and flexibility beyond deterministic methods. These findings highlight the potential of ML-assisted approaches as robust decision-support tools for water quality monitoring, pollution control, and sustainable basin management.

More from our Archive