Machine Learning–enabled Characterization of Normal Water Quality Behavior and Anomaly Detection in Groundwater and Surface Water Monitoring Systems
Abstract
Groundwater and surface water systems are monitored using physicochemical parameters such as pH, turbidity, electrical conductivity, temperature, oxidation–reduction potential (ORP), and residual chlorine to ensure environmental safety and public health. However, natural temporal variability limits the effectiveness of fixed threshold-based anomaly detection. This study proposes a data-driven framework for defining normal water quality behavior and detecting anomalies using machine learning. Historical sensor data were preprocessed to establish empirical normal ranges based on the 5th and 95th percentiles. Observations outside these bounds were labeled as abnormal, while those within were considered normal, enabling supervised classification. Two interpretable models, Logistic Regression and Random Forest, were implemented and evaluated using accuracy, precision, recall, F1-score, and ROC and precision–recall curves. Random Forest demonstrated superior performance with Precision = 0.93, Recall = 0.88, and F1-score = 0.90, outperforming Logistic Regression (Precision = 0.86, Recall = 0.74, F1-score = 0.79). The results demonstrate improved sensitivity, reduced false alarms, and stronger reliability for environmental contamination monitoring. Visualization tools, including normal range bands, correlation analysis, feature importance, temporal probability trends, and confusion matrices, enhanced interpretability. The framework enables early detection of contamination events and sensor anomalies, supporting reliable, real-time water quality monitoring and informed environmental decision-making.
Fields of Study & Subjects
Hydrological Forecasting Using AI
Water Quality Monitoring Technologies
Water Systems and Optimization
Publication details
- Journal / source
- Journal of Geography Environment and Earth Science International
- Publisher
- Sciencedomain International
- Volume
- 30
- Issue
- 6
- Pages
- 61–69
- Publication date
- 29 May 2026
- Language
- EN