Machine learning-based prediction of water quality indices to improve drinking water treatment operations: A case study in Ecuador
Preprint
- 3 October 2025
- preprint
- Published by Springer Nature in Research Square
Abstract
Ensuring access to safe drinking water remains a pressing global challenge, particularly in regions subject to seasonal hydrological variability and anthropogenic pressures. Water Quality Indices (WQI) provide a synthetic metric to condense multiple physicochemical parameters into a decisionoriented tool for treatment plant operations. This study applies, for the first time in Ecuador, a multi-horizon machine learning framework to predict the WQI of raw water at the intake of a drinking water treatment plant in Portoviejo, Manabí province. Using six daily-measured predictors (pH, turbidity, color, electrical conductivity, total dissolved solids, and total hardness), we implemented an M5P regression tree model with random hyperparameter search and conservative temporal cross-validation. The model achieved stable cross-validated performance across horizons (1–15 days), with R2 ranging from 0.962 (1-day) to 0.926 (15-day), and MAE between 1.3 and 2.5 WQI units, sufficient to discriminate category transitions. Complementary GLM–ANOVA analysis revealed significant contributions from pH and color, followed by ionic load variables, aligning with operational treatment processes. The integration of explainable machine learning, statistical significance testing, and interpretable forecasting strengthens traceability and regulatory compliance under national and WHO guidelines. Results demonstrate that parsimonious models based on plant data can anticipate WQI dynamics with actionable lead time, supporting proactive chemical dosing, filter management, and resilience against extreme events. The proposed framework is transferable to other Latin American contexts with seasonal hydrology, bridging predictive analytics and operational decision-making in alignment with Sustainable Development Goal SDG 6.Keywords
All Related Versions
Funding Information
- Pontificia Universidad Católica del Ecuador (N/A)
This publication has 67 references indexed in Scilit:
- A new framework for water quality instabilities simulation by artificial intelligence approaches and optimization algorithms under uncertaintyEnvironment, Development and Sustainability, 2025
- Transforming Complex Water Quality Monitoring Data into Water Quality IndicesWater Resources Management, 2025
- Assessment and prediction of Water Quality Index (WQI) by seasonal key water parameters in a coastal city: application of machine learning modelsEnvironmental Monitoring and Assessment, 2024
- Fast linear model trees by PILOTMachine Learning, 2024
- Water quality prediction using machine learning models based on grid search methodMultimedia Tools and Applications, 2023
- Global Sustainable Water Management: A Systematic Qualitative ReviewWater Resources Management, 2023
- Reconstructing missing data by comparing interpolation techniques: Applications for long‐term water quality dataLimnology and Oceanography: Methods, 2023
- A comprehensive review of water quality indices (WQIs): history, models, attempts and perspectivesReviews in Environmental Science and Bio/Technology, 2023
- Evaluation of conventional drinking water treatment plant efficiency according to water quality index and health risk assessmentEnvironmental Science and Pollution Research, 2019
- Assessment and rationalization of water quality monitoring network: a multivariate statistical approach to the Kabbini River (India)Environmental Science and Pollution Research, 2014