Machine learning-based prediction of water quality indices to improve drinking water treatment operations: A case study in Ecuador

preprint OA: closed
Full text JSON View at publisher

Abstract

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.
Full text 12,489 characters · extracted from preprint-html · click to expand
Machine learning-based prediction of water quality indices to improve drinking water treatment operations: A case study in Ecuador | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Machine learning-based prediction of water quality indices to improve drinking water treatment operations: A case study in Ecuador Wilfredo Angulo, Maribel Pérez This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7768222/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version 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. Artificial Intelligence and Machine Learning Water Quality Index (WQI) Machine learning Multi-horizon forecasting Drinking water treatment Ecuador Full Text Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-7768222","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":523913265,"identity":"b2aa940d-cf93-486f-b054-551a88934ab0","order_by":0,"name":"Wilfredo Angulo","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABXElEQVRIie2RMWvCQBTH73gQl1jXiGC+woVASyGtX6OjRyCTilDo0kFL4FxSu0Yc/Aq6OCuBdut8EAdFcI5bKCn0Tq3aYMGxlPyGO97x/3G89xDKyPizEISUHJ6Lc1Mqu2doo0iWuVQcdgoASSu4jX1Zwgllc59SQD2ObCn0X6bLZtOiXQAlih6sSqHvruZRctvQ7+jT0voY6xeAcLSufSvaLADTJw5lANDz3x3qz16vDF+17w1OXbPeDQ0GCIq98f4bbisllQR1BoUA8iyoIl4TLxrQkU9Zqe6FWCgK5PeKflAEnyyo6FJJSGurXHthJaWQHwpmAR5KBVUDOtCEguKQphSD26apEqclFeyJXkbcuSx6kzc6VBeu8dwObQbYPeqlzOliqSaWqXdcQLGYWJnbKy1OHumgY0/ncRLeDDruNFof2v8dMpGrYdsFnZGXk9nkkvPCGRkZGf+ZLwJKgRkX7LKLAAAAAElFTkSuQmCC","orcid":"https://orcid.org/0000-0003-1908-9554","institution":"PUCE and YACHAY","correspondingAuthor":true,"prefix":"","firstName":"Wilfredo","middleName":"","lastName":"Angulo","suffix":""},{"id":523913266,"identity":"27fa488e-39bd-43c6-9d5f-df4603002acf","order_by":1,"name":"Maribel Pérez","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA+klEQVRIiWNgGAWjYJCCwwwMFlBmBYSSIEILTM0ZCIugFma4GsY2IrTotp99eLigQoLBnL334cOf8w7X6TYwH7zNw2Ajj0uL2Zl0g8MzzkgwWPYcNzaQ3HZYwuwAW7I1D0OaYQMuLQfSGA7ztkkwGNxIY5MwBGvhMZPmYTicgNOW88+AWv4Btdx/xv4jcQ5IC/83oJb/uLXcANnSALKFjY3hYAPYFjaglgN4tABtmXFMgseyJ41ZsuFYOtA7bMaWcwyScfvlfBrz54IaGzlz9mOMH3/UWPObHW9+eONNhR3OEIMBHgM4kxlEGOBUiQDEqBkFo2AUjIIRCgBof0+4JJlThQAAAABJRU5ErkJggg==","orcid":"https://orcid.org/0000-0002-9687-5471","institution":"UTM","correspondingAuthor":true,"prefix":"","firstName":"Maribel","middleName":"","lastName":"Pérez","suffix":""}],"badges":[],"createdAt":"2025-10-02 17:13:49","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":true,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":true},"doi":"10.21203/rs.3.rs-7768222/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7768222/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":92707726,"identity":"f676c239-df16-43b1-bdbb-5c7a3a8e5ef9","added_by":"auto","created_at":"2025-10-03 10:15:16","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1778521,"visible":true,"origin":"","legend":"","description":"","filename":"anguloprez2025.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7768222/v1_covered_f723dc32-4123-4fab-93fc-e572d6e46a51.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003eMachine learning-based prediction of water quality indices to improve drinking water treatment operations: A case study in Ecuador\u003c/p\u003e","fulltext":[],"fulltextSource":"","fullText":"","funders":[{"identity":"56f2c8d4-7a96-4963-a68c-062309c63e9c","identifier":"10.13039/501100011749","name":"Pontificia Universidad Católica del Ecuador","awardNumber":"N/A","order_by":0}],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Pontificia Universidad Católica del Ecuador","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Water Quality Index (WQI), Machine learning, Multi-horizon forecasting, Drinking water treatment, Ecuador","lastPublishedDoi":"10.21203/rs.3.rs-7768222/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7768222/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eEnsuring 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.\u003c/p\u003e","manuscriptTitle":"Machine learning-based prediction of water quality indices to improve drinking water treatment operations: A case study in Ecuador","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-10-03 10:07:06","doi":"10.21203/rs.3.rs-7768222/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"5b8976fe-fc56-4bc9-9ee3-883b1ba2647e","owner":[],"postedDate":"October 3rd, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":55684791,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2025-10-03T10:07:06+00:00","versionOfRecord":[],"versionCreatedAt":"2025-10-03 10:07:06","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7768222","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7768222","identity":"rs-7768222","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00