{"title":"Predicting water potability using a machine learning approach","authors":"El-Bacha Rachid , Salhi Abderrahim , Abderrafia Hafid , Rabi Souad","doi":"10.1016/j.envc.2025.101131","DOIUrl":null,"url":null,"abstract":"<div><div>In order to improve the prevention of risks associated with water quality, the precise and rapid assessment of this later is necessary. Nevertheless, conventional techniques often encounter difficulties due to the complexity and inconsistency of water quality data, resulting in time-consuming and arduous analyses. This research introduces a novel application of machine learning (ML) to predict water potability. In this context, support vector machine (SVM) and random forest (RF) models were trained, validated and tested using publicly available dataset that include records of water potability as a function of various physical and chemical parameters. Results indicated that random forest model outperformed the support vector machine model by achieving better results, with 70 % accuracy, 72 % precision, and 75 % receiver operating characteristic area under the curve (ROC-AUC). These findings indicated that machine learning, specifically random forest, can be effective method for evaluating water potability, leading to enhanced water resource management and public health safety. Additionally, water treatment plants can utilize these machine learning algorithms for immediate data analysis. This enables the anticipation of contamination events before water reaches consumers. This model can play an important role in developing early alert systems by encouraging prevention measures rather than just reactive actions.</div></div>","PeriodicalId":34794,"journal":{"name":"Environmental Challenges","volume":"19 ","pages":"Article 101131"},"PeriodicalIF":0.0000,"publicationDate":"2025-03-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Environmental Challenges","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2667010025000496","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"Environmental Science","Score":null,"Total":0}
引用次数: 0
Abstract
In order to improve the prevention of risks associated with water quality, the precise and rapid assessment of this later is necessary. Nevertheless, conventional techniques often encounter difficulties due to the complexity and inconsistency of water quality data, resulting in time-consuming and arduous analyses. This research introduces a novel application of machine learning (ML) to predict water potability. In this context, support vector machine (SVM) and random forest (RF) models were trained, validated and tested using publicly available dataset that include records of water potability as a function of various physical and chemical parameters. Results indicated that random forest model outperformed the support vector machine model by achieving better results, with 70 % accuracy, 72 % precision, and 75 % receiver operating characteristic area under the curve (ROC-AUC). These findings indicated that machine learning, specifically random forest, can be effective method for evaluating water potability, leading to enhanced water resource management and public health safety. Additionally, water treatment plants can utilize these machine learning algorithms for immediate data analysis. This enables the anticipation of contamination events before water reaches consumers. This model can play an important role in developing early alert systems by encouraging prevention measures rather than just reactive actions.