Assessing recreational water quality with machine learning and SHAP-based interpretability

This paper aims to explore how machine learning (ML) can be used to forecast water quality tailored for recreational use by identifying contamination levels in water. The project investigates the physical and chemical properties of water that can be used to forecast bacterial contamination, with the goal of identifying the predominant water features influencing bacterial contamination forecast. Multiple classification models were developed and evaluated including Random Forest, Logistic Regression, k-Nearest Neighbors (KNN), and XGBoost. I additionally utilized SHAP (SHapley Additive ex Planations) and SHAP analysis to provide a detailed explanation of the model’s performance. Based on the Fecal Coliform levels, the impact on the model’s performance was the strongest, with both the Conductivity and Biodegradable Oxygen Demand (BOD) coming after and being of the same level. This aligns the findings with the general notions of environmental science. The limitations of the research include regional basis and applicability of the model to recreational water use. The developments of the research can help incorporate larger datasets with coverage of larger regions and try to predict drinking water safety to help improve the model’s accessibility.

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-09-30
DOI
https://doi.org/10.5281/zenodo.17758972
Primary Topic
Fecal contamination and water quality
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Assessing recreational water quality with machine learning and SHAP-based interpretability

Zenodo (CERN European Organization for Nuclear Research)
Fecal contamination and water quality
article

Assessing recreational water quality with machine learning and SHAP-based interpretability

article en

Abstract

This paper aims to explore how machine learning (ML) can be used to forecast water quality tailored for recreational use by identifying contamination levels in water. The project investigates the physical and chemical properties of water that can be used to forecast bacterial contamination, with the goal of identifying the predominant water features influencing bacterial contamination forecast. Multiple classification models were developed and evaluated including Random Forest, Logistic Regression, k-Nearest Neighbors (KNN), and XGBoost. I additionally utilized SHAP (SHapley Additive ex Planations) and SHAP analysis to provide a detailed explanation of the model’s performance. Based on the Fecal Coliform levels, the impact on the model’s performance was the strongest, with both the Conductivity and Biodegradable Oxygen Demand (BOD) coming after and being of the same level. This aligns the findings with the general notions of environmental science. The limitations of the research include regional basis and applicability of the model to recreational water use. The developments of the research can help incorporate larger datasets with coverage of larger regions and try to predict drinking water safety to help improve the model’s accessibility.

Zenodo (CERN European Organization for Nuclear Research)
Green Valley High School (US)
Clean water and sanitation
Openalex Percentile: Top 43%
Fecal contamination and water quality
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.