Skip to main content
Have a personal or library account? Click to login
Comparative Analysis of Machine Learning Algorithms for Water Quality Prediction Cover

Comparative Analysis of Machine Learning Algorithms for Water Quality Prediction

Open Access
|Jul 2024

Figures & Tables

Figure 1

Location of the study area in Khyber Pakhtunkhwa, Pakistan.

Figure 2

Flowchart of the applied process for the water quality classification.

Table 1

Distribution of water quality index (WQI) categories.

WQI RANGECATEGORIES
WQI < 50Excellent
50–100Very good
100–150Poor
150–200Very poor
WQI > 200Unsuitable for drinking
Figure 3

Decision tree visualization using the training set insight into model training.

Figure 4

Multiple layer perceptron for water quality classification.

Figure 5

Visualizing the distribution of water quality classes.

Table 2

Descriptive statistics of water quality index deviation from the WHO value (Ilaboya et al., 2014; Khwaja and Aslam, 2018).

S.NOPARAMETERS AND HEAVY METALSUNITWHO VALUEASSIGNED WEIGHTSRELATIVE WEIGHTSMEANSDRANGE
1Cdmg/L0.0540.120.040.01(0.01–0.07)
2Crmg/L0.0340.120.050.04(0–0.18)
3Pbmg/L0.0140.120.190.29(0.01–0.91)
4Nimg/L0.0730.090.050.02(0–0.17)
5Femg/L0.330.090.050.02(0.02–0.13)
6Asmg/L0.0150.1500(0–0)
7PhNumber6.5–8.540.127.740.25(7.3–8.6)
8EcµS/Cm40020.06107.1474.1(20–309)
9TDSmg/L50050.1553.9839.7(9.5–193)
Table 3

Boruta algorithms based relative importance of water quality parameters and heavy metals.

VARIABLEMEAN-IMPRANGENORM-HITSDECISION
Cd12.89(11.51–13.84)1.00Confirmed
Cr15.79(13.77–17.46)1.00Confirmed
Pb24.74(22.14–27.06)1.00Confirmed
Ni10.13(8.96–11.65)1.00Confirmed
Fe11.03(9.51–12.05)1.00Confirmed
As1.02(–0.77–2.48)0.00Rejected
Ph3.59(1.53–4.99)0.76Confirmed
Ec13.27(12.01–14.92)1.00Confirmed
TDS15.14(13.34–16.51)1.00Confirmed
Figure 6

Ranking important parameters provides insights from the random forest model.

Figure 7

Evaluating accuracy metrics across various supervised machine learning models.

Table 4

Models performance with weighted precision, recall, and F1-score.

MODELPRECISIONRECALLF1-SCORE
DT0.910.880.89
KNN0.860.590.70
MLP0.860.830.85
SVM0.870.890.88
RF0.900.880.89
Language: English
Page range: 177 - 192
Submitted on: Mar 26, 2024
Accepted on: Jul 12, 2024
Published on: Jul 30, 2024
Published by: Stockholm University Press
In partnership with: Paradigm Publishing Services

© 2024 Muhammad Akhlaq, Asad Ellahi, Rizwan Niaz, Mohsin Khan, Saad Sh. Sammen, Miklas Scholz, published by Stockholm University Press
This work is licensed under the Creative Commons Attribution 4.0 License.