IoT-Based Smart Water Quality Monitoring and Contamination Prediction
Keywords:
water quality monitoring, Internet of Things, contamination prediction, machine learning, XGBoost, Random Forest, and feature importance.Abstract
Catching contaminated water early protects public health, but standard laboratory tests cost too much, run slowly, and cannot warn people in real time. Here, we develop and evaluate a machine-learning framework designed to classify water quality and flag potential contamination from IoT sensor readings of pH, temperature, turbidity, dissolved oxygen, electrical conductivity, and total dissolved solids. We trained three classifiers, Random Forest, XGBoost, and Support Vector Machine (SVM), on time-ordered splits of the data and evaluated them across accuracy, precision, recall, F1-score, and area under the ROC curve (AUC). To determine which parameters matter most, the study combined impurity-based and permutation-based feature-importance analyses, evaluating real-time monitoring feasibility through a feature-subset test alongside an edge-deployment check; the results demonstrate that XGBoost delivers the best overall performance, turbidity, dissolved oxygen, and pH hold the greatest influence, a trimmed four-sensor setup preserves nearly the entire predictive capability, and a streamlined model operates within the memory and latency boundaries of cheap edge hardware. The paper provides a reproducible, end-to-end blueprint for IoT-driven contamination forecasting ready to apply in practical sensor installations.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Areej Javed

This work is licensed under a Creative Commons Attribution 4.0 International License.








