Compares machine learning methods for drinking water classification, suggesting improved assessment techniques.
Today, drinking-quality water is becoming a scarce resource, where water quality serves as an indicator of anthropogenic impact on the environment. This study presents a solution to the problem of binary classification of drinking water based on hydrochemical parameters, utilizing a comparative analysis of classical machine learning algorithms. The relevance of this research stems from the need for rapid, automated methods for the preliminary assessment of water quality within the framework of decision support systems for water treatment and monitoring. The objective of the study was to identify the most balanced algorithm for classifying water as either suitable or unsuitable for drinking, based on standard physicochemical parameters. Evaluating water against these parameters aids in assessing the state of the aquatic environment and its ecological safety. To address this classification task using machine learning algorithms, a complete data analysis pipeline was implemented. Three algorithms were subjected to detailed examination: Decision Tree, Random Forest, and Gradient Boosting. Automated modeling was employed using the PyCaret library. All models were evaluated on a dedicated test dataset using the following metrics: Accuracy, Precision, Recall, F1-score, and AUC-ROC. The most balanced results were obtained with the Random Forest model, which achieved an Accuracy of 0.61 and an F1-score of 0.48. The Gradient Boosting model demonstrated comparable overall accuracy, while the Decision Tree model yielded the highest Precision score, reaching 0.71. A feature importance analysis for the Random Forest model revealed that pH is the most significant predictor, a finding consistent with fundamental principles of drinking water quality assessment. These results establish a foundation for the preliminary identification of potentially substandard water samples and for supporting water quality monitoring efforts.
No takes yet. Share an insight, caveat, or question.
Fartukov et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: