# Water Quality Estimation from IoT Sensors Using a Meta-ensemble

Gregory Davrazos, Theodor Panagiotakopoulos, Sotiris Kotsiantis

► To cite this version:

Gregory Davrazos, Theodor Panagiotakopoulos, Sotiris Kotsiantis. Water Quality Estimation from IoT Sensors Using a Meta-ensemble. 19th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2023, León, Spain. pp.393-403, 10.1007/978-3-031-34171-7_32. hal-05419415

HAL Id: hal-05419415

https://inria.hal.science/hal-05419415v1

Submitted on 16 Dec 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
<figure><img src="image_3.png" /></figure>

# Water Quality Estimation from IoT Sensors Using a Meta-ensemble

Gregory Davrazos<fnref n="1" />(✉) ID, Theodor Panagiotakopoulos<fnref n="2" />,<fnref n="3" /> ID,
and Sotiris Kotsiantis<fnref n="1" /> ID

**Abstract.** Water quality estimation using machine learning is a type of data analysis process that uses algorithms to identify patterns in large sets of data related to water quality. This can include identifying pollutants and other potential contamination that could negatively impact quality for drinking purposes, recreational activities or other uses. This helps ensure that the safety of water sources and the quality of recreational activities are constantly monitored and maintained. Thus, in this paper, a set of existing machine learning classifiers is applied to Internet of Things (IoT) sensor data on various water quality parameters, and the results are compared. Subsequently, a meta ensemble classifier that utilizes the soft voting technique of the best four previous classifiers is proposed to enhance estimation accuracy. According to results on the majority of the metrics used, this meta ensemble classifier outperforms all previously considered classifiers.

**Keywords:** Machine learning · Internet of Things · Water quality · Meta Ensemble · Soft voting

## 1 Introduction

Water pollution has nowadays become a universal problem. Besides developed, developing countries are facing water pollution problems. In order to guide the selection of water sources and safeguard water bodies from pollution, water quality standards have been devised. According to Boyd [1] there are many variables for water quality, but depending on the use, only a few variables are selected. For example, drinking water must not include excessive amounts of minerals, poisons, or disease-causing organisms. Other water uses that demand some water quality standards to be met are water use for bathing, recreation, industrial processes, agriculture/aqua culture, etc. Despite the common truth that every human being needs water suitable for drinking to live, there are no common universal standards for drinking water quality. In terms of drinking water quality, there are

<footnote n="1">¹ Department of Mathematics, University of Patras, Patras, Greece
gdavrazo@upatras.gr, sotos@math.upatras.gr</footnote>

<footnote n="2">² School of Science and Technology, Hellenic Open University, Patras, Greece

**panagiotakopoulos@eap.gr**</footnote>

<footnote n="3">³ School of Business, University of Nicosia, Nicosia, Cyprus</footnote>
some regulations mostly in the European Union and the United States that require legal compliance from their countries and states respectively, while other countries' drinking quality standards are solely expressed as guidelines or targets. The World Health Organization has recently published an updated edition of guidelines on drinking-water quality [2] to form an authoritative basis for the setting of national regulations and standards for water safety.

Machine learning has been used to a variety of scientific and technological fields, such as education, healthcare, power systems, security, air quality, and shipping [3–7]. Machine learning approaches, have been also used for determining water quality in various settings, seems to outperform traditional techniques because they account for nonlinear relationships among the dependent variables and with lower level of sophistication required for deriving complex experimental equations [8]. These approaches have gained popularity as Internet of Things (IoT) technologies are increasingly deployed over the traditional water grid enabling acquisition of large streams of real-time data end enhancing monitoring, resource utilization and decision making capabilities [9] In order to get reliable and accurate results from machine learning techniques a high-quality training dataset is required. This paper applies various state-of-the-art machine learning models for water quality estimation using a publicly available IoT dataset that contains nine water quality metrics (variables). It also proposes a soft voting meta ensemble model to improve classification results.

The outline of this paper is as follows: In Sect. 2, we present a brief overview of machine learning approaches for evaluating water quality while in Sect. 3 several machine learning classifiers are tested over a freely available dataset and a model based on soft voting of the top-performing algorithms is proposed. Conclusions and discussion for further research end the paper.

## 2 Overview of Machine Learning Approaches in Water Quality Evaluation

Machine learning algorithms can be used to a variety of applications in evaluating water quality. In the following, we report on recent indicative research work that utilizes simple or more sophisticated machine learning algorithms to estimate water quality.

Kim et. al. [10] explored the application of three machine learning approaches (Random Forest, Cubist Regression Trees, Support Vector Regression) to estimate two water quality indicators in coastal waters on the west coast of South Korea using satellite data. A remote sensing-based multiscale model with machine learning, called CDMIM, was used to monitor water quality changes. This technique encompassed SIASS and SMIR algorithms and was successfully implemented on Lake Nicaragua to predict seasonal changes in water quality [11].

A variety of machine learning approaches, such as Support Vector Regression, Random Forests, Artificial Neural Networks, and Cubist Regression Trees have been used to monitor water quality indicators such as suspended solids, chlorophyll-a, and turbidity in optically complicated coastal waters of Hong
Kong [12]. Along these lines, the research presented in [13] compared the effec-
tiveness of ten machine learning models (Support Vector Machines, Decision
Trees, Random Forest, Naïve Bayes, Logistic Regression, k-NN, Linear Dis-
criminant Analysis, Completely-Random Tree, Completely-Random Tree Forest,
Deep Cascade Forest) in predicting water quality from Chinese rivers and lakes
from 2012 to 2018 on water quality parameters.

A machine learning-based method referred to as PCC-SVM (Pearson cor-
relation coefficient-support vector machine) for detection of cross-connection
events in potable-reclaimed water mixtures was proposed in [14]. WDT-ANFIS
augmented wavelet denoising technique was proposed to predict water quality
parameters at different stations, taking into consideration different amount of
inputs. Data from 2009 to 2010 was used to back up WDT-ANFIS and it held
a powerful capacity to reliably predict all water quality parameters [15].

Linear regression, Stochastic Gradient Descent, and Ridge regression estima-
tors were used to predict the water quality parameters of lagoons [16]. Different
regression algorithms such as linear regression, random forest regression, support
vector regression and Gaussian processes regression was used for satellite data
and in-situ measurements to assess two water quality parameters of the Valle de
Bravo reservoir in Mexico [17].

Two hybrid decision tree-based machine learning models based on Extreme
Gradient Boosting (XGBoost) and Random Forest (RF) and incorporating an
advanced data denoising technique called Complete Ensemble Empirical Mode
Decomposition with Adaptive Noise (CEEMDAN) were created and tested to
predict the quality of water more accurately [18].

Four different machine learning models (k-NN, Boosting Decision Trees, Support Vector Machines, Artificial Neural Network) was used to predict recreational water quality in Auckland, New Zealand [19]. Machine Learning models such as Artificial Neural Network, Multiple Linear Regression Decision Tree, Random Forest, Support Vector Regression (SVR), k-Nearest Neighbour (kNN), Stochastic Gradient Descent and Adaptive Boosting (AdaBoost) were developed and tested to effectively predict the quality of irrigation water in the Bouregreg watershed, Morocco [20].

Extra Tree Regression (ETR) model, among other models such as Support
Vector Regression and Decision Tree Regression model, yielded better predic-
tions of monthly Water Quality Index (WQI) for the Lam Tsuen River in Hong
Kong when the input of BOD, Turbidity and Phosphate concentration were
applied in both training and testing phases [21].

UAVs was used to generate hyperspectral data, which was then analyzed
using nine different machine-learning algorithms (Adaboost Regression, Gradi-
ent Boost Regression Tree, Extreme Gradient Boosting Regression, Catboost
Regression, Random Forest, Extremely Randomized Trees, Support Vector
Machine, Multi-Layer Perceptron Regression, Elastic Net), to predict two water
quality parameters [22]. A stacking approach to predict beach water quality,
which was found to be more reliable than individual machine learning models
such as Multiple Linear Regression, Partial Least Squares, Sparse Partial Least Squares, Random Forest, Bayesian Networks was presented in [23].

Machine Learning classifiers such as Support Vector Machine, Random Forest, Logistic Regression, Decision Tree, CATBoost, XGBoost, and Multilayer Perceptron were evaluated for predicting water quality for collected data between 2005 and 2014 from various sites in India [24]. For recent comprehensive reviews on machine learning algorithms for evaluating water quality the interested reader is referred to [25,26].

As the related work shows, the literature on using machine learning algorithms for determining water potability is very limited. Therefore, this work focuses on investigating how state-of-the-art machine learning models perform in this task and proposes a meta-ensemble to improve the water potability estimation performance.

# 3 Machine Learning Algorithms

In this section we will present the methodology for creating models based on machine learning algorithms for the categorization of water quality.

## 3.1 Dataset Description

For implementing machine learning algorithms, a dataset available online was used [27]. The water potability.csv file contains nine water quality independent variables such as pH value, Hardness, Solids (Total dissolved solids - TDS), Chloramines, Sulfate, Conductivity, Organic Carbon, Trihalomethanes (THM), Turbidity for 3276 different water bodies (cases). Potability is the dependent binary variable indicating if water is drinkable (1) or not (0). From 3276 water samples only the 39.01% of them is safe for human consumption with all the rest being unsuitable for humans. Features such as Sulfate, ph, Trihalomethanes contain 781, 491, 162 missing values respectively. Missing values comprise a common difficulty in data analysis that must be tackled in order not to have biased or incorrect result.

## 3.2 Preprocessing Phase

All machine learning models used in this study were trained, compared and evaluated using the PyCaret library, which is an open-source low-code machine learning toolkit written in Python [28].

In order for machine learning models to provide precise and insightful results, data preprocessing is an very important step. Our data preprocessing pipeline is depicted in Fig. 1, where LightGBM Classifier [29,30] was used as the regressor for iterative imputation of missing values. LightGBM is a machine learning algorithm based on Gradient Boosting Decision Tree (GBDT) combined with other algorithms such as Gradient-based One-Side Sampling (GOSS) and Exclusive Feature Bundling (EFB) [29]. LightGBM is an effective iterative method for
imputation of missing values due to its high-speed computing power and the ability to handle large datasets. One advantage of using LightGBM for imputation of missing values is that it can automatically identify important features from the data and use them to build accurate imputation models. Since LightGBM uses gradient-based learning and decision trees, it can also learn from data with high complexity.

Isolation Forest [31] was used as the method for dealing with the outliers. The Isolation Forest is a tree-based anomaly detection technique, as its name suggests. It employs an unsupervised learning methodology to find outliers in the data, which may subsequently be eliminated from the training set. Performance usually improves when the model is retrained on a data set without the outliers.MinMaxScaler [32] was used for data normalization.

As it can be noticed from Fig. 2, features distribution does not deviate significantly from normal distribution so a basic assumption for implementing t-test is satisfied. Before proceeding to develop machine learning models, a t-test for each feature towards the independent variable is performed to decide whether there is a feature that has a statistically significant effect on its own. Figure 3 summarizes the t-test results. The results indicate that no feature has a significant effect on water potability.

<figure><img src="image_4.png" /><figcaption>Fig. 1. Data Preprocessing Pipeline</figcaption></figure>

## 3.3 Machine Learning Models Deployment

After preprocessing, we tested the following machine learning models: Random Forest Classifier [33], Gradient Boosting Classifier (GBM) [34], Light Gradient Boosting Machine (LGBM) [29], Extreme Gradient Boosting (XGBoost) [35], AdaBoost Classifier [36], Decision Tree Classifier [37], Extra Trees Classifier [38], Quadratic Discriminant Analysis [39], Linear Discriminant Analysis [39], k Nearest Neighbors Classifier [40], Naive Bayes [41], Logistic Regression [42], Support Vector Machines - Linear Kernel [43]. A 10-fold cross validation resampling procedure was used for evaluating the performance of the predictive models using the Accuracy, Area Under Curve (AUC), Recall, Precision, F1, Kappa and Matthews Correlation Coefficient (MCC) metrics. The results are shown in descending order with respect to accuracy in Table 1. As it can be observed, the Random Forest Classifier performed better in all metrics but recall and precision, where it had small differences from LGBM and GBM respectively.

We also performed a feature importance analysis based on the Random Forest model [44]. The basic reason for performing this analysis using Random Forests
<figure><img src="image_5.png" /><figcaption>Fig. 2. Feature Distributions</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig. 3. Results of t-test for Features</figcaption></figure>

is that performed better than all the other examined models (Fig. 4). The feature importance plot according to the Random Forest Classifier is a graphical display of information that helps to explain how much influence each feature has on the
model's predictions. The plot shows an individual feature's importance relative to all other features in the dataset, and can help identify which features of the data are most important in predicting a model's outcome. The higher the importance score of a feature, the more influential it is in predicting the outcome. According to this, pH seems to be the most important feature for this machine learning model, although the other features cannot be ignored as the t-test has shown.

<figure><img src="image_7.png" /><figcaption>Fig. 4. Feature Importance Plot according to Random Forest Classifier</figcaption></figure>

## 3.4 Meta Ensemble Model Deployment

Aiming to improve the classification accuracy we constructed a meta ensemble machine learning model featuring a soft voting technique of the four best performing models with respect to accuracy (Random Forest, GBM, LGBM, XGBoost) is proposed (Fig. 5). Soft voting averages the probabilities for each class of the base models so that the class with the highest average probability is selected [45].

<figure><img src="image_8.png" /><figcaption>Fig. 5. Meta Ensemble Pipeline Data Processing</figcaption></figure>
<table><caption>**Table 1.** Metrics for Different Machine Learning Models</caption><thead><tr><th>Model</th><th>Accuracy</th><th>AUC</th><th>Recall</th><th>Precision</th><th>F1</th><th>Kappa</th><th>MCC</th></tr></thead><tbody><tr><td>Soft Voting MetaEnsemble</td><td><strong>0.8002</strong></td><td><strong>0.8851</strong></td><td>0.6380</td><td>0.8101</td><td><strong>0.7132</strong></td><td><strong>0.5633</strong></td><td><strong>0.5732</strong></td></tr><tr><td>Random Forest Classifier</td><td>0.7965</td><td>0.8726</td><td>0.6269</td><td>0.8099</td><td>0.7057</td><td>0.5542</td><td>0.5655</td></tr><tr><td>Gradient Boosting Classifier</td><td>0.7925</td><td>0.8742</td><td>0.5913</td><td><strong>0.8281</strong></td><td>0.6893</td><td>0.5401</td><td>0.5578</td></tr><tr><td>Light Gradient Boosting Machine</td><td>0.7897</td><td>0.8770</td><td><strong>0.6498</strong></td><td>0.7760</td><td>0.7067</td><td>0.5448</td><td>0.5505</td></tr><tr><td>Extreme Gradient Boosting</td><td>0.7851</td><td>0.8709</td><td><strong>0.6648</strong></td><td>0.7560</td><td>0.7070</td><td>0.5384</td><td>0.5416</td></tr><tr><td>Ada Boost Classifier</td><td>0.7391</td><td>0.8206</td><td>0.4948</td><td>0.7541</td><td>0.5963</td><td>0.4157</td><td>0.4366</td></tr><tr><td>Decision Tree Classifier</td><td>0.7268</td><td>0.7146</td><td>0.6592</td><td>0.6481</td><td>0.6531</td><td>0.4279</td><td>0.4284</td></tr><tr><td>Extra Trees Classifier</td><td>0.7077</td><td>0.7661</td><td>0.3795</td><td>0.7489</td><td>0.5018</td><td>0.3257</td><td>0.3641</td></tr><tr><td>Quadratic Discriminant Analysis</td><td>0.6707</td><td>0.6825</td><td>0.3194</td><td>0.6647</td><td>0.4278</td><td>0.2363</td><td>0.2686</td></tr><tr><td>K Neighbors Classifier</td><td>0.6290</td><td>0.6279</td><td>0.3937</td><td>0.5324</td><td>0.4523</td><td>0.1816</td><td>0.1863</td></tr><tr><td>Naive Bayes</td><td>0.6213</td><td>0.5911</td><td>0.2182</td><td>0.5339</td><td>0.3082</td><td>0.1087</td><td>0.1291</td></tr><tr><td>Logistic Regression</td><td>0.6112</td><td>0.5040</td><td>0.0032</td><td>0.2000</td><td>0.0062</td><td>0.0038</td><td>0.0197</td></tr><tr><td>Linear Discriminant Analysis</td><td>0.6112</td><td>0.5040</td><td>0.0032</td><td>0.2000</td><td>0.0062</td><td>0.0038</td><td>0.0197</td></tr></tbody></table>

As it is shown from Table 1 the meta ensemble model outperformed all sub models with respect to Accuracy, AUC, F1, Kappa and MCC. Only the GBM achieved better precision than the proposed meta ensemble while only LGBM demonstrated better Recall. The ROC curve also verifies the enhanced performance of the meta ensemble (Fig. 6).

<figure><img src="image_9.png" /><figcaption>**Fig. 6.** ROC Curve of MetaEnsemble</figcaption></figure>

## 4 Conclusions and Future Work

Drinking water quality is an essential human need and greatly affects public health. Machine Learning models possess an inherent ability to quickly and accurately assess water quality by analyzing data collected by IoT sensing devices.
These kind of models could lead to quicker and more effective ways of responding to problems in water systems, providing a better approach for decision making for local authorities and eventually leading to a healthier living environment especially in urban settings. This research study utilizes a water quality dataset available online to deploy various machine learning classifiers and assess and compare their performances. The top four classifiers were combined in a meta ensemble using the soft voting technique, which increased the water quality estimation accuracy.

Upon completion of this study a relevant study was discovered [46] that follows a similar methodology over the same dataset. The differences between these two research papers lie on different approaches at the data prepossessing stage which affect the performance of the common machine learning models. Also a Meta Ensemble is proposed in the present paper that outperforms all individual models. As future work, the present study can be modified to forecast water quality in real-time using deep learning models and IoT data or by incorporating the sentiments of local communities in water quality forecasting models.

**Acknowledgements.** This work was supported by the research project OpenDCO, "Open Data City Officer" (Project No.: 22022-1-CY01-KA220-HED-000089196, Erasmus+ KA2: KA220-HED - Cooperation partnerships in higher education)

## References

1. Boyd, C.E.: Water Quality. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-23335-8

2. World Health Organization: guidelines for drinking-water quality. https://www.who.int/publications/i/item/9789240045064. Accessed 25 Mar 2023

3. Jhaveri, R. H. et. al.: A review on machine learning strategies for real-world engineering applications. Mobile Inf. Syst. (2022). https://doi.org/10.1155/2022/1833507

4. Vonitsanos, G., Panagiotakopoulos, T., Kanavos, A., Tsakalidis, A.: Forecasting air flight delays and enabling smart airport services in apache spark. In: Artificial Intelligence Applications and Innovations. AIAI 2021 IFIP WG 12.5 International Workshops, pp. 407–417 (2021). https://doi.org/10.1007/978-3-030-79157-5_33

5. Panagiotakopoulos, T., Kotsiantis, S., Kostopoulos, G., Iatrellis, O., Kameas, A.: Early dropout prediction in MOOCs through supervised learning and hyperparameter optimization. Electronics 10(14), 1701 (2021). https://doi.org/10.3390/electronics10141701

6. Panagiotakopoulos, T., et al.: Vessel's trim optimization using IoT data and machine learning models. In: 13th International Conference on Information, Intelligence, Systems & Applications (2022). https://doi.org/10.1109/IISA56318.2022.9904361

7. Panagiotou, C., Panagiotakopoulos, T., Kameas, A.: A multi-modal decision making system for an ambient assisted living environment. In: 8th ACM International Conference on Pervasive Technologies Related to Assistive Environments (2015). https://doi.org/10.1145/2769493.2769529

8. Chou, J.-S., Chia-Chun, H., Ha-Son, H.: Determining quality of water in reservoir using machine learning. Ecol. inf. 44, 57–75 (2018)
9. Panagiotakopoulos, T., Vlachos, D. P., Bakalakos, T. V., Kanavos, A., Kameas, A.: A fiware-based iot framework for smart water distribution management. In: 12th International Conference on Information, Intelligence, Systems & Applications (2021). https://doi.org/10.1109/IISA52424.2021.9555509

10. Kim, Y.H., et. al.: Machine learning approaches to coastal water quality monitoring using GOCI satellite data. GIScience & Remote Sensing, vol. 51, no. 2, pp. 158–174 (2014). https://doi.org/10.1080/15481603.2014.900983

11. Chang, N.-B., Bai, K., Chen, C.-F.: Integrating multisensor satellite data merging and image reconstruction in support of machine learning for better water quality management. J. Environ. Manag. **201**, 227–240 (2017). https://doi.org/10.1016/j.jenvman.2017.06.045

12. Hafeez, S. et. al.: Comparison of machine learning algorithms for retrieval of water quality indicators in Case-II waters: a case study of Hong Kong. Remote Sens., vol. 11, no. 6 (2019). https://doi.org/10.3390/rs11060617

13. Chen, K. et. al.: Comparative analysis of surface water quality prediction performance and identification of key water parameters using different machine learning models based on big data. Water Res. **171** (2020). https://doi.org/10.1016/j.watres.2019.115454

14. Xu, X. et. al.: Real-time detection of potable-reclaimed water pipe cross-connection events by conventional water quality sensors using machine learning methods. J. Environ. Manage. **238**, 201–209 (2019). https://doi.org/10.1016/j.jenvman.2019.02.110

15. Ahmed, N. A. et al.: Machine learning methods for better water quality prediction. J. Hydrol. **578**, 124084 (2019). https://doi.org/10.1016/j.jhydrol.2019.124084

16. Li, Y., et al.: Lagoon water quality monitoring based on digital image analysis and machine learning estimators. Water Res. **172** (2020). https://doi.org/10.1016/j.watres.2020.115471

17. Arias-Rodriguez, L. et. al.: Monitoring water quality of valle de bravo reservoir, mexico, using entire lifespan of meris data and machine learning approaches. Remote Sens. **12**(10), 1586 (2020). https://doi.org/10.3390/rs12101586

18. Lu, H., Ma, X.: Hybrid decision tree-based machine learning models for short-term water quality prediction. Chemosphere **249** (2020). https://doi.org/10.1016/j.chemosphere.2020.126169

19. Xu, T., Coco, G., Neale, M.: A predictive model of recreational water quality based on adaptive synthetic sampling algorithms and machine learning. Water Res. **177**, 115788 (2020). https://doi.org/10.1016/j.watres.2020.115788

20. El Bilali, A., Taleb, A.: Prediction of irrigation water quality parameters using machine learning models in a semi-arid environment. J. Saudi Soc. Agric. Sci. **19**(7), 439–451 (2020). https://doi.org/10.1016/j.jssas.2020.08.001

21. Asadollah, S.B.H.S., et. al.: River water quality index prediction and uncertainty analysis: a comparative study of machine learning models. J. Environ. Chem. Eng. **9**(1) (2021) https://doi.org/10.1016/j.jece.2020.104599

22. Lu, Q. et. al.: Retrieval of water quality from UAV-Borne hyperspectral imagery: a comparative study of machine learning algorithms. Remote Sens. **13**(19), 3928 (2021). https://doi.org/10.3390/rs13193928

23. Wang, L. et. al.: Improving the robustness of beach water quality modeling using an ensemble machine learning approach. Sci. Total Environ. **765**, 142760 (2021). https://doi.org/10.1016/j.scitotenv.2020.142760

24. Nasir, N. et. al.: Water quality classification using machine learning algorithms. J. Water Process. Eng. **48**, 102920 (2022). https://doi.org/10.1016/j.jwpe.2022.102920
25. Tung, T.M., Yaseen, Z.M.: A survey on river water quality modelling using artificial intelligence models: 2000–2020. J. Hydrol. **585**, 124670 (2020). https://doi.org/10.1016/j.jhydrol.2020.124670

26. Mengyuan, Z., et al.: A review of the application of machine learning in water quality evaluation. Eco-Environment & Health (2022)

27. Kadiwal, A.: Water Quality [Dataset]. https://www.kaggle.com/adityakadiwal/water-potability. Accessed 25 Mar 2022

28. Ali, M.: Pycaret: an open source, low-code machine learning library in python, PyCaret version 2.3.5 (2020). https://www.pycaret.org. Accessed 25 Mar 2022

29. Ke, G., et al.: LightGBM: a highly efficient gradient boosting decision tree. Adv. Neural. Inf. Process. Syst. **30**, 3146–3154 (2017)

30. Luo, Y.: Evaluating the state of the art in missing data imputation for clinical data. Brief. Bioinform. **23**(1) (2022). https://doi.org/10.1093/bib/bbab489

31. Liu, F.T., Ting, K.M., Zhou, Z.-H.: Isolation forest. In: 8th IEEE International Conference on Data Mining, Pisa, Italy, pp. 413–422 (2008). https://doi.org/10.1109/ICDM.2008.17

32. Amorim, L.B., Cavalcanti, G.D., Cruz, R.M.: The choice of scaling technique matters for classification performance. Appl. Soft Comput. **133** (2023)

33. Breiman, L.: Random forests. Mach. Learn. **45**(1), 5–32 (2001)

34. Friedman, J.: Greedy function approximation: a gradient boosting machine. Ann. Stat. **29**(5) (2001)

35. Chen, T., Guestrin, C. XgBoost: a scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, pp. 785–794 (2016)

36. Freund Y., Schapire, R.E.: A decision-theoretic generalization of on-line learning and an application to boosting. Eur. Conf. Comput. Learn. Theory, 23–37. Barcelona, Spain (2016)

37. Quinlan, J.R.: Induction of decision trees. Mach. Learn. **1**(1), 81–106 (1986)

38. Geurts, P., Ernst, D., Wehenkel, L.: Extremely randomized trees. Mach. Learn. **63**(1), 3–42 (2006)

39. Tharwat, A.: Linear vs quadratic discriminant analysis classifier: a tutorial. Int. J. Appl. Pattern Recogn. **3**(2), 145–180 (2016)

40. Cover, T., Hart, P.: Nearest neighbor pattern classification. IEEE Trans. Inf. Theory **13**(1), 21–27 (1967). https://doi.org/10.1109/TIT.1967.1053964

41. Murphy, K.P.: Naive Bayes classifiers. Univ. British Columbia **18**(60), 1–8 (2006)

42. Kleinbaum, D.G., et al.: Logistic Regression, p. 536. Springer-Verlag, New York (2002)

43. Cortes, C., Vapnik, V.I.: Support vector networks. Mach. Learn. **20**(3), 273–297 (1995)

44. Genuer, R., Poggi, J.-M., Tuleau-Malot, C.: Variable selection using random forests. Pattern Recogn. Lett. **31**(14), 2225–2236 (2010)

45. Sharma, A., Shrimali, V. R., Beyeler, M.: Machine learning for OpenCV 4: intelligent algorithms for building image processing apps using OpenCV 4, Python, and scikit-learn. Packt Publishing Ltd (2019)

46. Kaddoura, S.: Evaluation of machine learning algorithm on drinking water quality for better sustainability. Sustainability **14**(18), 11478 (2022). https://doi.org/10.3390/su141811478