Machine Learning Applications in Predicting the Microbiological Quality of Public Fountain Waters: A Case Study of Bayburt Province
The access to reliable drinking water is of critical importance for human health and the United Nations Sustainable Development Goals (Goal 3: Good Health and Well-being, Goal 6: Clean Water and Sanitation). In this study, the microbiological water quality (Escherichia coli and total coliform) of five public fountains (Gordon, Kışla, Tarım, Aşağı Narkazan, and Yukarı Narkazan), which are intensively utilized by the public for drinking water in the province of Bayburt, was evaluated using time-series analysis and machine learning methods. The scope of the study utilized a comprehensive dataset of 476 monthly water analysis reports (285 safe, 191 contaminated) spanning the years 2014–2024. As a result of the trend and seasonality analyses applied to understand the temporal variations of contamination, no distinct seasonal patterns were detected in the examined fountains. While no significant trend was identified in E. coli concentrations, total coliform bacteria exhibited an increasing trend in the Kışla and Tarım fountains, and a decreasing trend in the Gordon fountain. To forecast water quality, six different supervised machine learning algorithms—namely Logistic Regression, K-Nearest Neighbors (KNN), Support Vector Machines (SVM), Naive Bayes, Decision Tree, and Random Forest—were implemented on the dataset. From a public health perspective, since the erroneous prediction of contaminated (unpotable) water as 'safe' by a machine (False Positive error) entails irreversible risks, the 'specificity' metric was prioritized as the core baseline for model performance evaluations. According to the analysis results; the Decision Tree, Naive Bayes, and Random Forest algorithms demonstrated flawless performance, achieving a score of 1.0 (100%) for both accuracy and specificity, thereby reducing the risk of faulty 'safe' predictions to zero. The empirical findings indicate that microbiological degradation is governed by irregular anthropogenic or environmental factors rather than predictable seasonal fluctuations. Deploying these flawless machine learning paradigms as an integrated early warning framework provides a robust scientific infrastructure for mitigating waterborne epidemics and guaranteeing sustainable access to safe drinking water.
Authors
- Gülhat Koçyiğit (ORCID: https://orcid.org/0009-0009-7136-2336)
- Ruşen Sınır (ORCID: https://orcid.org/0000-0003-0700-1041)
Institutions
- Bayburt University (TR)
Publication Details
- Journal
- Black Sea Journal of Engineering and Science
- Published
- 2026-09-14
- DOI
- https://doi.org/10.34248/bsengineering.1990047
- Primary Topic
- Fecal contamination and water quality
- Type
- article
- Field-Weighted Citation Impact
- 0.00