# Harnessing Deep Learning for Real-Time Water Quality Assessment: A Sustainable Solution

Selma Toumi, Sabrina Lekmine, Nabil Touzout, Hamza Moussa, Noureddine Elboughdiri, Reguia Boudraa, Ouided Benslama, Mohammed Kebir, Subhan Danish, Jie Zhang, et al.

► To cite this version:

Selma Toumi, Sabrina Lekmine, Nabil Touzout, Hamza Moussa, Noureddine Elboughdiri, et al. "Harnessing Deep Learning for Real-Time Water Quality Assessment: A Sustainable Solution." Water, 2024, 16 (23), pp.3380. 10.3390/w16233380. hal-04832946

HAL Id: hal-04832946

https://hal.science/hal-04832946v1

Submitted on 12 Dec 2024

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
Article

# Harnessing Deep Learning for Real-Time Water Quality Assessment: A Sustainable Solution

Selma Toumi<fnref n="1" />, Sabrina Lekmine<fnref n="2" />, Nabil Touzout<fnref n="3" /> ID, Hamza Moussa<fnref n="4" />,<fnref n="5" /> ID, Noureddine Elboughdiri<fnref n="6" /> ID, Reguia Boudraa<fnref n="7" /> ID, Ouided Benslama<fnref n="8" /> ID, Mohammed Kebir<fnref n="9" /> ID, Subhan Danish<fnref n="10" /> ID, Jie Zhang<fnref n="11" />,*, ID
Abdeltif Amrane<fnref n="12" />,*, ID and Hichem Tahraoui<fnref n="1" />,<fnref n="12" />,*

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

check for
updates

**Citation:** Toumi, S.; Lekmine, S.; Touzout, N.; Moussa, H.; Elboughdiri, N.; Boudraa, R.; Benslama, O.; Kebir, M.; Danish, S.; Zhang, J.; et al. Harnessing Deep Learning for Real-Time Water Quality Assessment: A Sustainable Solution. *Water* **2024**, *16*, 3380. https://doi.org/10.3390/w16233380

Academic Editor: Christos S. Akratos

Received: 11 October 2024
Revised: 17 November 2024
Accepted: 20 November 2024
Published: 24 November 2024

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

**Copyright:** © 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

**Abstract:** This study presents an innovative approach utilizing artificial intelligence (AI) for the prediction and classification of water quality parameters based on physico-chemical measurements. The primary objective was to enhance the accuracy, speed, and accessibility of water quality monitoring. Data collected from various water samples in Algeria were analyzed to determine key parameters such as conductivity, turbidity, pH, and total dissolved solids (TDS). These measurements were integrated into deep neural networks (DNNs) to predict indices such as the sodium adsorption ratio (SAR), magnesium hazard (MH), sodium percentage (SP), Kelley's ratio (KR), potential salinity (PS), exchangeable sodium percentage (ESP), as well as Water Quality Index (WQI) and Irrigation Water Quality Index (IWQI). The DNNs model, optimized through the selection of various activation functions and hidden layers, demonstrated high precision, with a correlation coefficient (R) of 0.9994 and a low root mean square error (RMSE) of 0.0020. This AI-driven methodology significantly reduces the reliance on traditional laboratory analyses, offering real-time water quality assessments that are adaptable to local conditions and environmentally sustainable. This approach provides a practical solution for water resource managers, particularly in resource-limited regions, to efficiently monitor water quality and make informed decisions for public health and agricultural applications.

**Keywords:** water quality; artificial intelligence; deep neural networks; physico-chemical measurements; real-time assessment; sustainable water management

<footnote n="1">¹ Laboratory of Biomaterials and Transport Phenomena (LBMTP), University Yahia Fares, Medea 26000, Algeria; toumiselma24@gmail.com</footnote>

<footnote n="2">² Biotechnology, Water, Environment and Health Laboratory, Abbes Laghrour University, Khenchela 40000, Algeria; sabrina.lekmin.400@gmail.com</footnote>

<footnote n="3">³ Faculty of Sciences, University of Medea, Nouveau pole Urbain, Medea University, Medea 26000, Algeria; nabil12marin.eco@gmail.com</footnote>

<footnote n="4">⁴ Laboratoire de Gestion et Valorisation des Ressources Naturelles et Assurance Qualité (LGVRNAQ), Faculté des Sciences de la Nature et de la Vie et des Sciences de la Terre, Université de Bouira, Bouira 10000, Algeria; hamza.moussa49@gmail.com</footnote>

<footnote n="5">⁵ Département des Sciences Biologiques, Faculté des Sciences de la Nature et de la Vie et des Sciences de la Terre, Université de Bouira, Bouira 10000, Algeria</footnote>

<footnote n="6">⁶ Chemical Engineering Department, College of Engineering, University of Ha'il, P.O. Box 2440, Ha'il 81441, Saudi Arabia; ghilaninouri@yahoo.fr</footnote>

<footnote n="7">⁷ Technical Platform for Physico-Chemical Analyzes (PTAPC-Bejaia), Targa Ouzemmour, Bejaia 06000, Algeria; boudraa1414@gmail.com</footnote>

<footnote n="8">⁸ Laboratory of Natural Substances, Biomolecules, and Biotechnological Applications, Department of Natural and Life Sciences, Larbi Ben M'hidi University, Oum El Bouaghi 04000, Algeria; benslama.wided@hotmail.fr</footnote>

<footnote n="9">⁹ Research Unit on Analysis and Technological Development in Environment (URADTE-CRAPC), BP 384, Bou-Ismail 42000, Algeria; medkebir@yahoo.fr</footnote>

<footnote n="10">¹⁰ Pesticide Quality Control Laboratory, Agriculture Complex, Old Shujabad Road, Multan 60000, Pakistan; sd96850@gmail.com</footnote>

<footnote n="11">¹¹ School of Engineering, Merz Court, Newcastle University, Newcastle Upon Tyne NE1 7RU, UK</footnote>

<footnote n="12">¹² University Rennes, Ecole Nationale Supérieure de Chimie de Rennes, CNRS, ISCR-UMR6226, F-35000 Rennes, France</footnote>

<footnote>* Correspondence: jie.zhang@newcastle.ac.uk (J.Z.); abdeltif.amrane@univ-rennes1.fr (A.A.); tahraoui.hichem@univ-medea.dz (H.T.)</footnote>
# 1. Introduction

Water is a vital resource for human survival and for all terrestrial ecosystems, playing a central role in numerous activities [1–3], from human consumption to agricultural irrigation, industrial processes, and energy production. Water quality is crucial for public health and economic well-being, yet it is increasingly threatened by pollution and climate change [4,5]. According to the World Health Organization (WHO), approximately 2 billion people worldwide lack access to safely managed drinking water, a situation that underscores the importance of monitoring and managing this precious resource [6]. However, water pollution is one of the most serious environmental threats of the 21st century [7]. It primarily results from human activities, including industrialization, intensive agriculture, and urbanization, which release toxic substances such as heavy metals, pesticides, pharmaceuticals, and microplastics into surface and groundwater [8,9]. These contaminants have detrimental effects on human health and aquatic ecosystems, causing severe diseases, loss of biodiversity, and disruption of food chains [10–12]. For instance, pollutants like mercury and lead can accumulate in aquatic organisms and move up the food chain, endangering human and animal populations that consume these resources [11]. One of the main challenges lies in the diffuse and varied nature of pollution sources, which can be point sources (such as industrial discharges) or non-point sources (such as agricultural runoff) [13,14]. This diversity complicates the monitoring and control of water quality, making analyses increasingly complex as new pollutants emerge [15]. Thus, monitoring water quality becomes a major challenge due to the multiplicity of parameters to analyze and the constraints associated with traditional methods [16]. Conventional methods of classifying and assessing water quality, which rely on laboratory analyses, require specialized equipment and advanced technical expertise [17].

They are often costly and time-consuming, limiting their accessibility in resource-limited regions, particularly in developing countries where water quality monitoring infrastructures are scarce [18]. The primary water quality indices used in these methods include the sodium adsorption ratio (SAR), percentage of sodium (SP), magnesium hazard (MH), Kelley's ratio (KR), potential salinity (PS), exchangeable sodium percentage (ESP), as well as specific indices like the Water Quality Index (WQI) and the Irrigation Water Quality Index (IWQI) [19,20]. These indices are essential for evaluating the suitability of water for human consumption or irrigation, but their calculation relies on sophisticated chemical and physicochemical analyses [21,22]. Furthermore, the sensitivity of these analyses to environmental variations is a concern. Extreme climatic events, such as floods or prolonged droughts, can rapidly alter water properties, rendering analysis results obsolete if not performed frequently [23]. Additionally, temperature fluctuations, pollutant inputs, and changes in water flow complicate the acquisition of reliable and consistent data, especially over large geographical areas [24]. These limitations of traditional water classification methods, while proven, exhibit several weaknesses [25]. Their implementation often requires substantial financial resources, heavy equipment, and specialized skills, creating an access barrier for small rural communities or developing countries that lack the means and infrastructure for regular water quality monitoring [26,27]. Moreover, regional variations and disparities in assessment protocols complicate the comparison of results between different studies or geographical areas [28,29]. Water quality regulations vary from country to country, and assessment criteria may evolve over time based on new scientific discoveries or emerging health requirements [30,31]. This necessitates continuous updates to methodologies, an effort that is not always feasible in resource-limited contexts [32]. Moreover, laboratory monitoring processes are slow and often unable to provide real-time results. When a water sample is collected and sent for analysis, results can take several days to obtain, during which significant changes in water quality may occur, especially in dynamic aquatic systems like rivers or lakes. In light of these limitations, innovative solutions have emerged thanks to technological advancements [33,34].

Artificial intelligence (AI), in particular, offers promising prospects for enhancing water quality monitoring by making the process faster, more accessible, and more accurate [35,36].
Many research investigations have focused on the prediction of water quality in real-time to reduce the cost, time, and limitations of laboratory analyses. For example, Hussein et al. [37] used artificial intelligence to assess the quality of groundwater for irrigation in the Naâma region. They compared three machine learning models (XGBoost, SVR, and KNN) based on hydrochemical parameters such as ions, pH, and electrical conductivity. Ajayi et al. [38] developed a real-time water quality monitoring system for Cape Town, South Africa. Utilizing three machine learning algorithms (random forest (RF), logistic regression (LR), and support vector machine (SVM)), they assessed both water potability and irrigation quality. A set of physicochemical parameters, including pH, total dissolved solids (TDS), total hardness (TH), electrical conductivity (EC), and ion concentrations, served as predictors for the water quality indices. Their findings revealed that LR offered superior performance for potability assessment, while SVM performed better for irrigation water quality evaluation. Another investigation was carried out by Trabelsi et al. [39], in which they assessed the effectiveness of different machine learning models (random forest, support vector regression, artificial neural networks, and AdaBoost) for predicting the quality of groundwater intended for irrigation in the Medjerda river basin, Tunisia. The models were trained on physicochemical parameters such as total dissolved solids, potential salinity, sodium adsorption ratio, exchangeable sodium percentage, and magnesium adsorption ratio. Their results showed that the AdaBoost algorithm offered the best performance in terms of water quality prediction, making it a promising tool for irrigation management. Further, Ahmed et al. [40] demonstrated the effectiveness of long short-term memory (LSTM) networks in predicting groundwater quality in arid regions, such as the Sohag region in Egypt. By utilizing a dataset of ten physicochemical parameters (pH, turbidity, total hardness, total dissolved solids, iron, magnesium, nitrate, sulfate, chloride, and total coliforms), the authors developed a model capable of accurately estimating WQI. Their model's performance, evaluated using the root mean square error (RMSE), was found to be highly satisfactory, underscoring the potential of deep learning techniques for sustainable water resource management.

The use of AI simplifies laboratory analyses by relying on more accessible physicochemical measurements, such as conductivity, turbidity, pH, and TDS [41,42]. These measurements, easily achievable in the field using portable equipment, can be integrated into machine learning models to provide a rapid assessment of water quality [43].

For example, deep neural networks (DNNs) can be employed to predict water quality indices, such as the SAR, SP, MH, KR, PS, ESP, WQI, and IWQI, with extremely high accuracy [44,45]. AI models can be trained on vast historical datasets, combining real-time measurements with laboratory analysis results to establish precise predictions [46]. One of the major advantages of this approach is the ability to obtain real-time results, allowing for rapid intervention in cases of pollution detection or changes in water quality [47]. This is particularly important in contexts where resources are limited or where traditional monitoring is difficult to implement [17]. AI also offers significant flexibility by allowing models to be adapted to local specificities, considering geographical and climatic variations to provide personalized predictions [48]. In addition to accuracy and speed, the use of AI for water quality monitoring also contributes to environmental sustainability [35,49]. By reducing reliance on laboratory analyses and transported samples, this approach decreases carbon emissions associated with travel and necessary infrastructure [50,51]. This contributes to a smaller ecological footprint while ensuring effective and sustainable management of water resources. Furthermore, the ability to monitor water quality in real time provides a valuable tool for water resource managers, enabling them to make informed decisions about resource allocation, ecosystem protection, and public health risk prevention [17,52,53].

In this work, an innovative approach based on AI was developed to predict and classify water quality parameters using easily accessible field-based physico-chemical measurements. The aim was to overcome the limitations of traditional water quality monitoring methods, which are often costly, time-consuming, and require technical expertise. By integrating DNNs, this method enables real-time assessment of water quality based on
easily measurable parameters such as conductivity, turbidity, pH, and TDS. Water samples were collected throughout the year from various locations in the Médéa region of Algeria to capture seasonal and geographical variations in water quality. Laboratory analyses were used to calculate indices such as SAR, SP, MH, KR, PS, ESP, WQI, and IWQI. A database was created to train DNNs models to predict these indices from field measurements, with a particular focus on optimizing network architectures and data normalization. The novelty of this work lies in the application of AI to enhance the accuracy, speed, and accessibility of water quality monitoring. The developed approach not only provides real-time results but also allows models to be adapted to local specificities, which is crucial for sustainable and effective water resource management. Additionally, a MATLAB application was developed to facilitate the use of this technology in the field.

This work is novel in its innovative application of AI, specifically DNNs, to predict water quality parameters from on-site physico-chemical measurements. The study introduces a unique methodology by utilizing AI techniques to predict water quality indices using easily obtainable field measurements such as conductivity, turbidity, pH, and TDS. This offers a more efficient alternative to traditional methods that typically rely on complex laboratory analysis. The AI models developed in this study have demonstrated high precision in predicting key water quality indices, such as the salinity index, sodium index, and residual sodium carbonate index. These models provide significant improvements over conventional methods, which may be prone to human error or require expensive, intricate equipment. The models' low error rates highlight the robustness and reliability of AI in enhancing water quality assessments, making the process more accurate and efficient. Another key advantage of this approach is its ability to provide real-time water quality assessments. This is crucial for effective water resource management, especially in response to the rapid environmental changes brought on by climate change and pollution. The adaptability of AI in delivering real-time data ensures that decision-making regarding water quality can be conducted swiftly and accurately, leading to better management practices. Moreover, this method makes water quality monitoring more accessible and sustainable. By offering a faster, cost-effective, and user-friendly solution, it increases the ability to monitor water quality in regions where traditional methods may be difficult or costly to implement. This democratizes access to water quality data, particularly in resource-limited areas, promoting more sustainable water management. In addition to the AI models, a MATLAB R2022b-based application was developed to facilitate the practical use of this methodology. This application allows users to input physico-chemical parameters such as conductivity, turbidity, pH, and TDS, whether measured in the field or in the laboratory. The tool then uses DNNs to predict various water quality indices, including SAR, SP, MH, KR, PS, ESP, WQI, and IWQI. This application offers a quick and accurate way to predict water quality, eliminating the need for complex calculations and allowing for the rapid classification of water quality according to established standards. This makes it easier to identify necessary corrective measures when water quality does not meet regulatory requirements. In summary, this study shows how AI, particularly DNNs, can transform water quality monitoring by making it faster, more accurate, and more accessible. The integration of the MATLAB application simplifies the classification process and enhances water resource management, providing a more sustainable and efficient solution for global water quality monitoring.

## 2. Materials and Methods

### 2.1. Geographical and Climatic Diversity of the Study Area

The Médéa region, located in northern Algeria, is characterized by its rich geographical and climatic diversity. Positioned between the Mediterranean zones to the north and semi-arid areas to the south, it serves as a natural crossroads between two contrasting ecosystems. At an average altitude of about 1000 m, Médéa benefits from a temperate climate in the north, with cool, wet winters and mild summers, while the southern parts exhibit semi-arid conditions.
This climatic and geographical diversity supports a variety of agricultural activities and provides abundant natural resources, making the region an ideal setting for an in-depth study of water quality. The region's unique characteristics ensure the relevance and applicability of findings to both Mediterranean and semi-arid environments.

## 2.2. Assessment of Water Quality Analyses and Protocols

Over a 12-month period, a comprehensive and rigorous daily water sampling campaign was conducted across various zones in the Médéa region of Algeria, specifically from 64 communes (Figure 1), including Aïn Boucif, Aïn Ouksir, Aissaouia, Aziz, Baata, Benchicao, Beni Slimane, Berrouaghia, Bir Ben Laabed, Boghar, Bou Aiche, Bouaichoune, Bouchrahil, Boughezoul, Bouskene, Chahbounia, Chellalet El Adhaoura, Cheniguel, Derrag, Deux Bassins, Djouab, Draa Essamar, El Azizia, El Guelb El Kebir, El Hamdania, El Omaria, El Ouinet, Hannacha, Kef Lakhdar, Khams Djouamaa, Ksar Boukhari, Meghraoua, Médéa, Moudjbar, Meftaha, Mezerana, Mihoub, Ouamri, Oued Harbil, Ouled Antar, Ouled Bouachra, Ouled Brahim, Ouled Deide, Ouled Hellal, Ouled Maaref, Oum El Djalil, Ouzera, Rebaia, Saneg, Sedraia, Seghouane, Si Mahdjoub, Sidi Damed, Sidi Errabia, Sidi Naamane, Sidi Zahar, Sidi Ziane, Souagui, Tablat, Tafraout, Tamesguida, Tizi Mahdi, Tlatet Eddouar, and Zoubiria.

Each day, approximately three water samples, each consisting of 1 L, were collected from strategically selected points within each commune to ensure the representativeness of the samples. This method was specifically designed to capture the diverse hydrological and geographical conditions that characterize the region. By selecting multiple sampling points at each location, the sampling approach accounted for the spatial variability across the region, ensuring that the collected samples accurately reflected both temporal changes in water quality and the geographical differences among various locations.

In total, 523 samples were collected throughout the campaign. The sampling strategy was meticulously designed to consider a wide range of factors that could influence water quality, including climatic variations, seasonal changes, and pollution impacts. By maintaining daily sampling over the entire year of 2023, the study was able to capture the full spectrum of environmental fluctuations affecting water quality, such as rainfall variations, temperature shifts, and potential contamination from agricultural runoff, urbanization, and industrial activities. This extensive and continuous sampling effort provided a robust and comprehensive dataset that facilitated a detailed analysis of how these dynamic factors interact and influence water quality over time.

### 2.2.1. Collection Procedure

Water samples were collected at a depth of 15 to 30 cm below the surface to minimize the influence of the surface layer. Sterilized glass bottles were used for sampling, which were thoroughly rinsed with distilled water and autoclaved to eliminate any risk of cross-contamination [3]. Immediately after collection, the samples were cooled in an insulated cooler maintained at a constant temperature of 4 °C to slow degradation processes. They were then stored in opaque containers to protect them from light exposure [3]. To prevent air contact and ensure their integrity, the samples were hermetically sealed. Insulated containers were used during transport to maintain temperature stability throughout the process [3].
<figure><img src="image_4.png" /><figcaption>**Figure 1.** Mapping of sampling points in Médéa, Algeria.</figcaption></figure>

### 2.2.2. Laboratory Analyses

The collected samples were analyzed on the same day following the protocols outlined in Water Analysis by Jean Rodier (10th edition) [3,54]. Key parameters such as conductivity, turbidity, pH, and TDS were measured with high precision using appropriate techniques and instruments. Conductivity was measured with a conductivity meter (e.g., Mettler Toledo) calibrated with standard solutions, turbidity was assessed using a turbidimeter (e.g., Hach 2100Q), and pH was determined using a calibrated pH meter (e.g., Thermo Scientific Orion Star). Total Dissolved Solids (TDS) were measured gravimetrically using a drying oven and analytical balance (e.g., Sartorius) [3].

Additional parameters, including calcium, magnesium, sodium, potassium, chloride, sulfate, and bicarbonate, were analyzed using standardized methods [3,54]. Calcium and magnesium concentrations were determined by complexometric titration using EDTA
solution and a suitable indicator, while sodium and potassium were quantified using flame photometry (e.g., Jenway 6505) [3,54]. Chloride concentration was measured using argento-metric titration, sulfate was determined using gravimetric analysis after precipitation with barium chloride, and bicarbonate levels were estimated through titration with a strong acid, employing phenolphthalein as an indicator [3,54]. These parameters were then used to calculate water quality indices such as SAR, MH, SP, KR, PS, and ESP, as well as WQI and IWQI, which were calculated based on specific formulas derived from the concentrations of the respective ions.

All laboratory analyses adhered to strict good laboratory practices. Equipment was regularly calibrated to ensure accuracy, and detailed documentation of each step was maintained [3,54]. Before analysis, samples were thoroughly homogenized using sterile gloves to prevent contamination [3,54]. This detailed and rigorous protocol ensured the accuracy and reliability of results, providing a representative and comprehensive assessment of water quality in the Médéa region.

## 2.3. Determination of Collected Water Quality Indices

The determination of water quality indices, such as the SAR, MH, SP, KR, PS, ESP, WQI, and IWQI, relies on specific analytical methods to assess various aspects of water quality. Below is a detailed development of the method for each index.

### 2.3.1. Sodium Adsorption Ratio (SAR)

The SAR is an indicator of the relative proportion of sodium compared to calcium and magnesium ions in water [55,56].

$$ SAR = \frac{Na^{+}}{\sqrt{\frac{Ca^{2+} + Mg^{2+}}{2}}} \quad (1) $$

A high SAR may indicate an increased risk of water sodicity, which can adversely affect soils and crops when irrigated.

### 2.3.2. Magnesium Hazard (MH)

The MH assesses the potential risk associated with the presence of magnesium in water. A high MH may indicate an increased potential for magnesium deposits to form, leading to precipitation and clogging issues in water distribution systems and irrigation equipment [56,57]. The MH is calculated using the following formula [56]:

$$ MH\% = \left[ \frac{Mg^{2+}}{Ca^{2+} + Mg^{2+}} \right] \times 100 \quad (2) $$

This formula evaluates the proportion of magnesium ($Mg^{2+}$) relative to the sum of the concentrations of calcium ($Ca^{2+}$) and magnesium ($Mg^{2+}$).

### 2.3.3. Sodium Percentage (SP)

The Sodium Percentage (SP) is calculated using the formula [56]:

$$ SP = \left[ \frac{Na^{+} + K^{+}}{Ca^{2+} + Mg^{2+} + Na^{+} + K^{+}} \right] \times 100 \quad (3) $$

This formula assesses the proportion of sodium ($Na^{+}$) and Potassium ($K^{+}$) compared to the sum of the concentrations of calcium ($Ca^{2+}$), magnesium ($Mg^{2+}$), sodium ($Na^{+}$), and Potassium ($K^{+}$). A high SP may indicate an increased risk of water sodicity, which can compromise water quality for certain uses, particularly irrigation [56].
### 2.3.4. Kelley's Ratio (KR)

The KR evaluates the relative balance between cations (calcium, magnesium, sodium) and anions (bicarbonate) in water [56]. The KR is calculated using the formula [56]:

$$KR = \left[ \frac{Na^{+}}{Ca^{2+} + Mg^{2+}} \right] \quad (4)$$

A high KR may suggest water enriched in divalent cations (calcium and magnesium) relative to monovalent cations (sodium) and anions, which can have implications for water stability and its suitability for various uses [56].

### 2.3.5. Potential Salinity (PS)

The PS is a measure of the water's potential salinity, calculated using the formula [58]:

$$PS = Cl^{-} + \frac{SO_{4}^{2-}}{2} \quad (5)$$

A high PS may indicate an increased risk of water salinity, which can affect its quality for irrigation and other uses [58,59].

### 2.3.6. Exchangeable Sodium Percentage (ESP)

The ESP assesses the proportion of exchangeable sodium in the soil, which can have implications for its structure and fertility. The ESP is calculated using the formula [58,60]:

$$ESP = \frac{Na^{+}}{Ca^{2+} + Mg^{2+} + Na^{+} + K^{+}} \times 100 \quad (6)$$

A high ESP may indicate an increased risk of soil sodicity, which can affect crop growth and agricultural productivity [58].

### 2.3.7. Water Quality Index (WQI)

The WQI aggregates several water quality parameters to provide a comprehensive assessment of its quality. It employs specific weights to prioritize each parameter based on its relative importance, generating an overall score to evaluate water quality [61].

* Assigning Weights to Hydrochemical Parameters: In this step, each hydrochemical parameter is evaluated based on its impact on overall water quality [61]. For instance, elements like calcium and bicarbonate, known to significantly influence surface water quality, may receive higher weights, while elements like potassium, considered less detrimental, may receive lower weights [61]. The weights assigned to each parameter are typically determined by previous studies, public health guidelines, or environmental standards [61].

* Calculating the Relative Weight (Wi) of Each Hydrochemical Parameter: Once the weights are assigned, the relative weight of each hydrochemical parameter is calculated using the formula [61]:

$$Wi = \frac{w_i}{\sum_{i=1}^{n} w_i} \quad (7)$$

where Wi represents the relative weight, wi is the weight assigned to each parameter (Table 1), and n is the total number of parameters considered in the calculation [61].
<table><caption>**Table 1.** Weights and Relative Weights of Hydrochemical Parameters [61].</caption><thead><tr><th>Parameters</th><th>Ca</th><th>Mg</th><th>Na</th><th>K</th><th>Cl</th><th>SO<sub>4</sub></th><th>HCO<sub>3</sub></th></tr></thead><tbody><tr><td>WHO (2017)</td><td>75</td><td>50</td><td>200</td><td>10</td><td>250</td><td>250</td><td>500</td></tr><tr><td>FAO (1985)</td><td>400</td><td>60</td><td>920</td><td>2</td><td>1065</td><td>1920</td><td>610</td></tr><tr><td colspan="8">Weight (w<sub>i</sub>)</td></tr><tr><td></td><td>5</td><td>3</td><td>4</td><td>2</td><td>4</td><td>3</td><td>5</td></tr><tr><td colspan="8">Relative Weight (w<sub>i</sub>)</td></tr><tr><td></td><td>0.1923</td><td>0.1154</td><td>0.1538</td><td>0.0769</td><td>0.1154</td><td>0.1538</td><td>0.1923</td></tr></tbody></table>

Notes: WHO: World Organization (2017); FAO: Food and Agriculture Organization (1985).

* Determining the Quality Scale (qi) for Each Hydrochemical Parameter

For each hydrochemical parameter, its quality scale is evaluated by comparing its concentration in each water sample to an established reference concentration for drinking water or irrigation [61]. This comparison is typically performed using the formula [61]:

$$qi = \frac{C_i}{S_i} \times 100 \qquad (8)$$

where qi represents the quality ranking, Ci is the concentration of each hydrochemical parameter in each water sample, and Si is the established reference concentration for drinking water (Table 1) [61].

* Calculation of the Water Quality Index (WQI)

Finally, the WQI is calculated using a formula that combines the relative weights of each parameter with their respective quality scales [61,62]. The calculation generally proceeds as follows [61]:

$$WQI = \sum_{i=1}^{n} w_i \times q_i \qquad (9)$$

where WQI represents the Water Quality Index, wi is the relative weight of each hydrochemical parameter, and qi refers to the quality index of each parameter [61]. By combining these different steps, the WQI provides a quantitative measure of overall water quality, which can be used to assess its suitability for human consumption and agricultural irrigation [63]. This process allows for a systematic and objective evaluation of water quality, taking into account multiple hydrochemical parameters and their interactions.

### 2.3.8. Irrigation Water Quality Index (IWQI)

The IWQI is similar to the WQI but specifically focuses on parameters relevant to agricultural irrigation [61]. The IWQI is calculated using a method similar to that of the WQI, but with a notable difference: when calculating the quality scale (qi), the specified reference concentration (Si) for irrigation (Table 1) is used [61,64].

### 2.4. Database Creation

After determining the quality indices for each sample, the obtained results were associated with analyses of conductivity, turbidity, pH, and TDS. To create a comprehensive database, these data were recorded with conductivity, turbidity, pH, and TDS as input variables. In contrast, the SAR, MH, SP, KR, PS, ESP, WQI, and IWQI were selected as output variables.

### 2.5. Prediction Using Deep Neural Networks (DNNs)

DNNs represent a significant advancement in the field of machine learning [65]. Their complex architecture, comprising multiple interconnected layers of neurons, allows for sophisticated data modeling [65,66]. Inspired by the functioning of the human brain, these
networks can learn hierarchical representations of data, identifying complex features at
various levels of abstraction [65].

The operation of DNNs is based on two main processes [67]. First, during the forward propagation, data are introduced into the network and transmitted through the different layers [67]. Each layer performs transformation operations on the data, enabling the network to learn increasingly abstract features as the data progress through the layers [67]. Next, during backpropagation, the synaptic weights of the network are adjusted to minimize a loss function, using gradients calculated from the difference between the predicted output and the expected output [67].

What distinguishes DNNs from other machine learning models is their ability to efficiently handle high-dimensional data [68]. Due to their deep structure and capacity to learn complex representations, they can model intricate datasets with great accuracy [68].

Moreover, DNNs have a significant advantage in terms of generalization. Despite their complexity, they can generalize to new data, meaning they can produce accurate predictions on data they have not encountered before. This is due to their ability to learn discriminative features of the data rather than merely memorizing training examples [68,69].

DNNs are powerful tools in machine learning, capable of learning complex data representations, modeling high-dimensional datasets, and generalizing effectively to new data. These characteristics make DNNs essential tools in many fields, such as computer vision, natural language processing, computational biology, and more [65].

In this study, DNNs were selected to predict a range of quality indices: SAR, MH, SP, KR, PS, ESP, as well as the WQI and IWQI. To enable the use of a single model for all outputs, a fifth input variable was introduced to encode the quality indices based on the following conventions: SAR is represented by 1, MH by 2, SP by 3, KR by 4, PS by 5, ESP by 6, WQI by 7, and IWQI by 8. Each output was based on 455 out of 523 samples, and since a single model was used for all eight outputs, the total dataset consisted of 3640 samples. However, the remaining 68 samples were reserved for testing the final model, ensuring an unbiased performance evaluation. As a single model was used for all eight outputs, the test dataset contained 544 samples (68 samples × 8 outputs).

The choice of DNNs for predicting water quality indices is based on several technical and theoretical considerations. A study on predicting lake water quality indices with sensitivity-uncertainty analysis using deep learning algorithms highlights their utility [70]. DNNs stand out for their ability to learn complex, hierarchical representations of data, making them an ideal choice for problems where relationships between variables are nonlinear and difficult to model using classical techniques such as linear regression or decision trees [71]. In this study, the input variables (conductivity, turbidity, pH, TDS) and the water quality indices (SAR, MH, SP, KR, PS, ESP, WQI, and IWQI) exhibit complex interactions, justifying the use of DNNs capable of identifying these nonlinear patterns. Unlike simpler machine learning models, such as linear regression or support vector machines (SVMs), DNNs can capture multivariate dependencies in the data without requiring explicit specification of the relationship between independent and dependent variables [72]. Additionally, DNNs are particularly effective when it comes to handling large amounts of multidimensional data, such as those obtained from multiple chemical measurements of water quality [73]. Furthermore, their ability to “learn” from massive datasets enables reliable predictions even with a large number of input parameters, which is crucial in water quality analysis where the quality may be influenced by many interconnected factors [74]. Finally, DNNs have the advantage of adapting to the specificities of temporal and spatial sampling, capturing seasonal or geographical trends that other models might overlook [75].
2.5.1. Database Normalization

Once the database was constructed, the next critical step was to normalize the data, bringing all variables into a standardized range between [0 and 1]. This normalization process is essential for ensuring that all features contribute equally to the model training. Input variables in the dataset—such as conductivity, turbidity, pH, and TDS—often have vastly different scales and units. For instance, conductivity values may range from 100 to 2000 µS/cm, while pH values might range from 4 to 10. Without normalization, features with larger numerical ranges would dominate the model's learning process, potentially distorting the results. By transforming all features to the same scale, normalization prevents this issue and allows the model to treat each feature with equal importance.

Normalization also enhances the stability and efficiency of the training process [76]. Many machine learning algorithms, including DNNs, rely on gradient-based optimization methods like gradient descent [77]. If features are on different scales, the gradient descent algorithm can become inefficient, taking uneven steps across dimensions, which slows convergence [78]. By normalizing the data, the optimization process becomes smoother and faster, helping the model reach an optimal solution more quickly [79]. Furthermore, normalization prevents potential computational issues, such as numerical instability, that can arise when performing operations on data with vastly different ranges.

The normalization process itself is relatively straightforward. Each feature's value is scaled by subtracting the feature's minimum value and dividing by its range (maximum–minimum). This transformation ensures that all features are mapped to a [0, 1] range, making the data more suitable for input into the DNNs.

2.5.2. Deep Neural Network Architecture Optimization

After the data normalization, the next crucial step in developing an effective model was to optimize the architecture of DNNs. The architecture optimization process involves selecting key hyperparameters, such as the activation functions, the number of hidden layers, and the number of neurons in each layer, in order to achieve the best performance. One of the primary considerations in optimizing DNNs' architecture was the choice of activation functions. Activation functions introduce nonlinearity into the model, enabling it to learn complex relationships within the data. In this study, three different activation functions were tested: tanh, sigmoid, and ReLU. The tanh function outputs values between -1 and 1, which is useful for data centered around zero. However, it is prone to the vanishing gradient problem, where gradients become too small in deeper layers, hindering learning. The sigmoid function, which outputs values between 0 and 1, is commonly used in binary classification but suffers from similar issues of vanishing gradients, particularly for deep networks. On the other hand, ReLU (Rectified Linear Unit) outputs values between 0 and infinity, which allows it to avoid the vanishing gradient problem and speeds up learning, making it a popular choice for deep networks.

In addition to activation functions, the number of hidden layers and neurons per layer were also varied to determine the optimal architecture. The number of hidden layers was tested between 3 and 10, while the number of neurons in each layer was varied between 3 and 30. The goal was to find a balance between a model that is sufficiently complex to capture intricate patterns and one that does not overfit the data. Too few layers or neurons can lead to underfitting, where the model is too simple to capture the underlying relationships. Conversely, too many layers or neurons can lead to overfitting, where the model becomes overly tailored to the training data and performs poorly on new, unseen data.

To prevent overfitting, careful attention was paid to the number of model parameters. It is essential to ensure that the number of model parameters does not exceed the number of rows in the dataset. When the number of parameters becomes too large relative to the number of data points, the model may memorize the training data rather than learning generalized patterns, leading to poor generalization on unseen data. Maintaining a reason-
able ratio between the number of parameters and the number of data points is crucial for building a model that performs well both during training and when applied to new data.

### 2.5.3. K-Fold Cross-Validation

To assess the performance of the optimized DNNs model and ensure its generalization ability, K-fold cross-validation was employed. In K-fold cross-validation, the dataset is randomly divided into K subsets, or “folds”. The model is then trained on K-1 folds and validated on the remaining fold. This process is repeated K times, with each fold serving as the validation set exactly once [80]. This technique helps ensure that the model’s performance is not overly dependent on any single subset of the data [80].

For this study, the dataset was divided into 10 folds (K = 10), and each time, 70% of the data was used for training, while 30% was used for validation. The 70–30% split allows the model to learn from a substantial portion of the data, while the validation set provides an independent measure of the model’s performance. This ensures that the model is not just memorizing the training data but is instead learning to generalize to new, unseen data. By repeating this process across multiple folds, K-fold cross-validation provides a more reliable estimate of the model’s true performance [80].

K-fold cross-validation also helps mitigate the risk of overfitting by allowing the model to be tested on multiple subsets of the data [80]. If a model performs well across all folds, it suggests that the model is robust and can generalize well to different data points. This method reduces the likelihood of bias that may occur if only a single training and validation split is used [80].

### 2.5.4. Best Model Selection

To select the best model, two criteria were considered: the coefficient of determination (R) and the root mean square error (RMSE). These metrics assess the quality of the model’s fit to the data and quantify the prediction error [81–86].

$$R = \frac{\sum_{i=1}^{N} (y_{\text{exp}} - \bar{y}_{\text{exp}}) (y_{\text{pred}} - \bar{y}_{\text{pred}})}{\sqrt{\sum_{i=1}^{N} (y_{\text{exp}} - \bar{y}_{\text{exp}})^2 \sum_{i=1}^{N} (y_{\text{pred}} - \bar{y}_{\text{pred}})^2}} \quad (10)$$

$$RMSE = \sqrt{\left(\frac{1}{N}\right) \left(\sum_{i=1}^{N} \left[(y_{\text{exp}} - y_{\text{pred}})\right]^2\right)} \quad (11)$$

where N is the number of data samples, $y_{\text{exp}}$ and $y_{\text{pred}}$ are the experimental and the predicted values, respectively, and $\bar{y}_{\text{exp}}$ and $\bar{y}_{\text{pred}}$ are, respectively, the average values of the experimental and the predicted values [86–90].

The process of developing and optimizing DNNs is illustrated in Figure 2 using a detailed diagram. It highlights the key stages, from the initial design of the network to its final optimization. This diagram serves as a structured guide to understanding the fundamental steps of this complex process.
<figure><img src="image_5.png" /><figcaption>**Figure 2.** Detailed diagram illustrating the development and optimization process of Deep Neural Networks (DNNs).</figcaption></figure>

## 3. Results

### 3.1. Deep Neural Networks

As previously stated, DNNs were chosen to predict drinking water and irrigation quality indices based on a robust and flexible model for eight different pollution indices. To achieve optimal results, a meticulous optimization of the DNNs' architecture was carried out.
In this optimization process, several activation functions were tested, including “tanh”, “sigmoid”, and “relu”. Each activation function has distinct characteristics and advantages [91]. The “tanh” function transforms input values to a range between -1 and 1, helping to center the data and accelerate convergence [92]. The “sigmoid” function produces outputs between 0 and 1, often used for binary classification problems, though it may encounter issues with vanishing gradients [93,94]. The “relu” (Rectified Linear Unit) function activates only positive values while setting negative ones to zero, making it a popular choice for its simplicity and efficiency in mitigating the vanishing gradient problem, thus facilitating the training of deep models [95,96]. In addition to activation functions, the architecture of DNNs was systematically optimized. The number of hidden layers was varied from 3 to 10, and the number of neurons per layer was adjusted between 3 and 30. This exploration aimed to strike a balance between capturing complex data features and preventing overfitting. A critical constraint was ensuring that the number of model parameters did not exceed the number of rows in the dataset to avoid overfitting, where the model might memorize the training data without learning to generalize. By keeping the parameters lower than the sample size, the model remained robust and capable of accurate predictions on unseen data. To further assess the performance of the optimized DNNs and ensure their generalization ability, K-fold cross-validation was employed. In this method, the dataset was randomly divided into 10 subsets, or “folds”. The model was trained on 9 folds and validated on the remaining 1, repeating the process 10 times, with each fold serving as the validation set once [80]. This approach ensured that the model’s performance was not overly dependent on any specific subset of the data. For this study, the dataset was divided into 10 folds, with a 70-30% training/validation split. This setup allowed the model to learn from a substantial portion of the data while using the validation set to provide an independent measure of performance [80].

After optimization, the best model obtained, based on the metrics R and RMSE, exhibits the following architecture. The model starts with a sequence input layer (sequenceInputLayer) tailored to the size of the input data (inputSize). This layer efficiently handles sequences of data, which is crucial for time series or sequential data applications.

Next, the model includes five fully connected layers (fullyConnectedLayer) with sizes of 16, 15, 18, 10, and 12 neurons, respectively. These layers are designated as FC1, FC2, FC3, FC4, and FC5. Fully connected layers are essential for capturing the core features of the data at different levels of abstraction, allowing the model to learn complex relationships between input and output variables. Each fully connected layer is followed by a ReLU layer (reluLayer). The ReLU layers, named relu_1, relu_2, relu_3, relu_4, and relu_5, introduce non-linearities into the model. ReLU activation functions are particularly effective in avoiding the vanishing gradient problem and speeding up the convergence of model training.

The final fully connected layer (fullyConnectedLayer) with a single neuron, named fc4, produces the model's final output. This layer is crucial as it transforms the abstract features learned by the previous layers into a quantitative prediction. Finally, the model ends with a regression layer (regressionLayer). This layer compares the predicted output with the actual values, calculating the loss to optimize the model weights. The regression layer is essential for continuous prediction tasks, such as those involving water quality indices. The architecture of the optimal model obtained has been graphically illustrated in Figure 3.
<figure><img src="image_6.png" /><figcaption>**Figure 3.** The architecture of the optimal DNNs model.</figcaption></figure>

The results obtained for the metrics R and RMSE (Table 2) further highlight the exceptional performance of the optimized model.

<table><caption>**Table 2.** Performance of the DNNs Model Tested.</caption><thead><tr><th colspan="3">R</th><th colspan="3">RMSE</th></tr><tr><th>Train</th><th>Val</th><th>ALL</th><th>Train</th><th>Val</th><th>ALL</th></tr></thead><tbody><tr><td>0.9997</td><td>0.9994</td><td>0.9994</td><td>0.0018</td><td>0.0023</td><td>0.0020</td></tr></tbody></table>

The R values of 0.9997 for the training set, 0.9994 for the validation set, and 0.9994 for the complete set show an outstanding correlation between the predicted and actual values. An R-value close to 1 indicates a near-perfect linear relationship between the model's predictions and the actual water quality indices, meaning the model has successfully learned to predict the desired outputs with high accuracy. The high R values for both the training and validation sets suggest that the model is not only fitting the training data well but also generalizing effectively to unseen data, avoiding overfitting. This indicates the robustness and reliability of the model across different datasets.

The RMSE values are extremely low: 0.0018 for the training set, 0.0023 for the validation set, and 0.0020 for the complete set. RMSE measures the average magnitude of the errors between predicted and actual values, with lower values indicating more accurate predictions. These very low RMSE values reflect that the model's predictions are very close to the true values, suggesting that the model is highly precise. The slight increase in RMSE for the validation set compared to the training set is a typical occurrence and indicates that the model is appropriately balanced—it shows that the model has not memorized the training data but rather has learned generalizable patterns that work well on new, unseen data.

Together, these results (high R and low RMSE) emphasize the model's accuracy and generalization capability, confirming that the optimization process led to a highly effective model for predicting water quality indices.

These results are graphically presented in Figure 4a-c.
<figure><img src="image_7.png" /></figure>

<figure><img src="image_8.png" /><figcaption>Figure 4. *Cont.*</figcaption></figure>
<figure><img src="image_9.png" /><figcaption>**Figure 4.** Comparison between experimental and predicted values: (a) Training phase, (b) Validation phase, and (c) All phases.</figcaption></figure>

Thanks to this optimized architecture, the model achieves improved performance in terms of the accuracy of predictions for drinking water and irrigation quality indices. The meticulous optimization of the architecture, including the selection of activation functions, the number of hidden layers, and the number of neurons per layer, has maximized the predictive capabilities of the model while avoiding overfitting [80,97]. This approach demonstrates the power of deep neural networks in addressing complex prediction problems and providing reliable and accurate results [98].

## 3.2. *Model Performance Testing*

To assess the robustness and generalization of the model, a distinct database comprising 544 samples, which had not been previously used for training or validation, was introduced. This test database plays a critical role in evaluating the model's ability to make accurate predictions on unseen data, thus simulating the conditions that the model would face in real-world applications [99]. By withholding these 544 samples from the training and validation process, we ensure that the model is not overfitted to the specific characteristics of the training dataset.

The use of a separate test dataset allows us to gauge the model's performance on new, previously unseen data, providing a more realistic assessment of its predictive capabilities [100]. It serves as an unbiased evaluation to verify that the model has not simply memorized patterns from the training set but instead has learned to generalize across different data points [100]. The results obtained from this evaluation offer crucial insights into the model's ability to generalize beyond the data it was trained on. By analyzing its performance on this independent test set, we can determine whether the model maintains its accuracy and reliability when exposed to novel, real-world data [101]. This step is essen-
tial to understanding the model's robustness and its potential for real-world deployment in dynamic, unpredictable environments [101].

Table 3 presents in detail the statistical coefficients, such as correlation coefficients and associated errors, thus providing a comprehensive assessment of the model's performance on this new test database. These results enable the evaluation of the model's effectiveness and reliability in real-world application contexts, which is essential to ensure its utility and relevance in practical situations.

<table><caption>**Table 3.** Model Test Performance.</caption><thead><tr><td>R</td><td>RMSE</td></tr></thead><tbody><tr><td>0.99938</td><td>0.0031</td></tr></tbody></table>

The results obtained for the R and RMSE on the new test database are very encouraging. The R is measured at 0.99938, indicating an extremely strong correlation between the values predicted by the model and the actual values observed in the test data. This result suggests that the model is capable of effectively capturing the trends and variations present in the data, which is essential for accurate predictions in real-world situations.

As for the RMSE, it is evaluated at 0.0031. This very low value indicates that the model's predictions are, on average, very close to the actual values. In other words, the average error between the model's predictions and the real observations is minimal, confirming the model's ability to produce precise and reliable predictions on new, previously unseen data.

In conclusion, these results demonstrate the robustness and generalization capability of the model, as well as its ability to maintain high performance on independent test data. This accuracy and reliability enhance confidence in using the model for predicting water quality across various application contexts.

To provide a visual representation of these performances, the experimental values and the predicted values are graphically illustrated in Figure 5.

<figure><img src="image_10.png" /><figcaption>**Figure 5.** Comparison between experimental and predicted values for test data.</figcaption></figure>
### 3.3. *Residual Analysis*

In this section, a residual analysis has been conducted to rigorously evaluate the effec-
tiveness and performance of the selected model [80,102]. The residual method and error
histogram were employed in this process [80,99]. Subsequently, a comparative analysis was
performed by juxtaposing the experimental values with the predicted values, encompassing
the entire dataset, including those from the training, validation, and test sets (Figure 6a).
Furthermore, a meticulous assessment of the error was undertaken by calculating the
disparity between the experimental and predicted values for the entire dataset, including
the training, validation, and test sets [100]. This error was then graphically represented
(Figure 6b) using residual analysis methods. This approach allows for a detailed evaluation
of the quality of the model’s predictions and highlights areas where improvements could
be made to further optimize its performance [99].

<figure><img src="image_11.png" /><figcaption>**Figure 6.** Analysis of residuals using multiple techniques based on estimated values: (a) Comparison of experimental data with predicted values, and (b) Histogram of the frequency distribution of residuals.</figcaption></figure>
Figure 6a illustrates a perfect overlap between the predicted degradation rates of AMO and the experimental values across the three phases of the study. Conversely, the analysis of Figure 6b reveals a distribution of instances with high values, with the majority of errors exceeding 2200, observed during the training, validation, and testing phases of the data. In light of these observations, we can confidently conclude the accuracy and exceptional performance of our obtained model.

### 3.4. Comparative Evaluation of the Model's Performance Against Literature

Table 4 highlights the superior performance of the DNNs model in predicting water quality indices compared to other benchmark models. With an R of 0.9997 for training and 0.9994 for testing, and an RMSE of 0.0018 and 0.0023, respectively, the DNNs demonstrate exceptional accuracy and reliability. These results outperform those of alternative models, such as artificial neural networks (ANN), long short-term memory models (LSTM), and multiple linear regression (MLR), particularly in terms of consistency and error minimization.

<table><caption>**Table 4.** Comparative Analysis of Model Efficiency Across Various Water Quality Indices.</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">Database Size</th><th rowspan="2">Inputs</th><th rowspan="2">Outputs</th><th colspan="2">R</th><th colspan="2">RMSE</th><th rowspan="2">Reference</th></tr><tr><th>Train</th><th>Test</th><th>Train</th><th>Test</th></tr></thead><tbody><tr><td rowspan="4">Artificial neural network (ANN)</td><td rowspan="14">140</td><td rowspan="14">Magnesium, Calcium, Bicarbonate, Carbonate, Sodium, and Potassium</td><td>MH</td><td>0.998001</td><td>0.994009</td><td>0.002735</td><td>0.008781</td><td rowspan="14">[103]</td></tr><tr><td>SAR</td><td>0.997801</td><td>0.993212</td><td>0.023108</td><td>0.029631</td></tr><tr><td>Permeability index (PI)</td><td>0.996004</td><td>0.990025</td><td>0.006181</td><td>0.011446</td></tr><tr><td>Soluble sodium percentage (SSP)</td><td>0.998001</td><td>0.995006</td><td>0.31305</td><td>0.363731</td></tr><tr><td>Kelly ratio (KI)</td><td>0.996004</td><td>0.996004</td><td>0.006116</td><td>0.00634</td></tr><tr><td>MH</td><td>0.999748</td><td>0.812187</td><td>0.00164</td><td>0.043908</td></tr><tr><td>SAR</td><td>0.999957</td><td>0.683688</td><td>0.002883</td><td>0.251246</td></tr><tr><td>PI</td><td>0.999753</td><td>0.967122</td><td>0.001555</td><td>0.018754</td></tr><tr><td>SSP</td><td>0.93129</td><td>0.066016</td><td>2.246052</td><td>13.82245</td></tr><tr><td>KI</td><td>0.999931</td><td>0.795875</td><td>0.0037</td><td>0.049018</td></tr><tr><td>MH</td><td>0.973859</td><td>0.956621</td><td>0.016405</td><td>0.01934</td></tr><tr><td>SAR</td><td>0.986722</td><td>0.988923</td><td>0.049997</td><td>0.039245</td></tr><tr><td>PI</td><td>0.970681</td><td>0.962027</td><td>0.01737</td><td>0.020062</td></tr><tr><td>SSP</td><td>0.974383</td><td>0.967353</td><td>1.158658</td><td>1.170854</td></tr><tr><td>KI</td><td>0.94756</td><td>0.959979</td><td>0.0261</td><td>0.020295</td></tr></tbody></table>
<table><caption>**Table 4. Cont.**</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">Database Size</th><th rowspan="2">Inputs</th><th rowspan="2">Outputs</th><th colspan="2">R</th><th colspan="2">RMSE</th><th rowspan="2">Reference</th></tr><tr><th>Train</th><th>Test</th><th>Train</th><th>Test</th></tr></thead><tbody><tr><td rowspan="6">Support vector regression (SVR)</td><td rowspan="18">ANN</td><td rowspan="18">476</td><td>TDS</td><td>0.93</td><td>0.94</td><td>1357.69</td><td>1270.68</td><td rowspan="18">[58]</td></tr><tr><td>PS</td><td>0.95</td><td>0.95</td><td>7.16</td><td>6.73</td></tr><tr><td>SAR</td><td>0.81</td><td>0.83</td><td>2.38</td><td>2.18</td></tr><tr><td>ESP</td><td>0.62</td><td>0.65</td><td>12.53</td><td>12.18</td></tr><tr><td>Magnesium Adsorption Ratio (MAR)</td><td>0.49</td><td>0.51</td><td>15.18</td><td>14.74</td></tr><tr><td>TDS</td><td>0.96</td><td>0.96</td><td>390.33</td><td>400.63</td></tr><tr><td>PS</td><td>0.95</td><td>0.95</td><td>6.91</td><td>6.77</td></tr><tr><td>SAR</td><td>0.82</td><td>0.83</td><td>2.23</td><td>2.14</td></tr><tr><td>ESP</td><td>0.65</td><td>0.65</td><td>11.78</td><td>11.68</td></tr><tr><td>MAR</td><td>0.51</td><td>0.52</td><td>14.64</td><td>14.29</td></tr><tr><td>TDS</td><td>0.93</td><td>0.96</td><td>543.60</td><td>343.92</td></tr><tr><td>PS</td><td>0.92</td><td>0.95</td><td>8.84</td><td>5.76</td></tr><tr><td>SAR</td><td>0.79</td><td>0.83</td><td>2.42</td><td>1.35</td></tr><tr><td>ESP</td><td>0.62</td><td>0.65</td><td>12.35</td><td>7.49</td></tr><tr><td>MAR</td><td>0.47</td><td>0.52</td><td>15.36</td><td>8.93</td></tr><tr><td>TDS</td><td>0.95</td><td>0.99</td><td>440.78</td><td>182.0</td></tr><tr><td>PS</td><td>0.92</td><td>0.99</td><td>8.75</td><td>3.7</td></tr><tr><td>SAR</td><td>0.75</td><td>0.98</td><td>2.72</td><td>0.9</td></tr><tr><td>ESP</td><td>0.69</td><td>0.98</td><td>13.40</td><td>4.2</td></tr><tr><td>MAR</td><td>0.64</td><td>0.98</td><td>16.15</td><td>2.9</td></tr><tr><td>SVR</td><td></td><td>Magnesium, Calcium, Sodium, and Potassium</td><td></td><td>/</td><td>0.98738</td><td>/</td><td>2.6925</td></tr><tr><td>Extreme gradient boosting (XGBoost)</td><td>166</td><td>Magnesium, Calcium, Sodium, Potassium, Chloride, Sulfate, Bicarbonate, Nitrate, Conductivity, and Mineralization</td><td>IWQI</td><td>/</td><td>0.9834</td><td>/</td><td>2.8272</td></tr><tr><td>K-Nearest neighbors (KNN)</td><td></td><td>Magnesium, Calcium, Sodium, Potassium, and Chloride</td><td></td><td>/</td><td>0.9843</td><td>/</td><td>3.59517</td></tr><tr><td>This work (DNNs)</td><td>3640</td><td>Conductivity, turbidity, pH, and TDS</td><td>SAR, SP, MH, KR, PS, ESP, WQI, and IWQI</td><td>0.9997</td><td>0.9994</td><td>0.0018</td><td>0.0023</td></tr></tbody></table>
In comparison, ANN and LSTM models deliver competitive performance for specific indices like MH and SAR, but their RMSE remains higher than that of DNNs. Additionally, LSTMs, while powerful for capturing temporal sequences, exhibit notable instability in their test results. For instance, for the SAR index, the LSTM's R drastically drops to 0.68 during testing, whereas the DNNs maintain an R of 0.9994, highlighting the latter's reliability. Traditional models, such as MLR, fall short when dealing with complex nonlinear relationships. For indices like MH, their RMSE is significantly higher, indicating their inability to effectively capture intricate dependencies between parameters.

Approaches such as random forest (RF) and AdaBoost demonstrate variable performance depending on the indices. For example, while AdaBoost achieves a low RMSE for certain indices like SAR, it performs less effectively for other indices like PS. Conversely, DNNs deliver remarkable accuracy and stability across all indices, owing to their optimized architecture and ability to model nonlinear relationships efficiently. The versatility of DNNs, capable of predicting eight different indices with a single architecture, sets them apart from other models that are often limited to one or two indices.

This robustness and accuracy position DNNs as a key tool for practical applications. In agricultural management, they facilitate effective water classification for irrigation using indices such as SAR and IWQI. For drinking water quality, they provide rapid and reliable WQI assessments, aiding decision-making to ensure compliance with standards. The DNNs' ability to produce stable and precise predictions, even in noisy environments or scenarios characterized by complex relationships, makes them an ideal solution for real-time monitoring and proactive water resource management.

In conclusion, the DNNs model significantly outperforms the other approaches presented in Table 4 due to its overall performance, robustness, and ability to handle complex datasets. Its results demonstrate that it is well-suited to the current challenges of water quality management, offering unparalleled accuracy and versatile applications across diverse contexts.

### 3.5. Water Quality Classification

To evaluate the quality of drinking or irrigation water in a given region, a comprehensive analysis of several physico-chemical parameters is essential for determining the water's suitability for various uses. The assessment begins with the measurement of conductivity, turbidity, pH, and TDS at multiple sampling locations throughout the study area.

Once these parameters are collected, they serve as the basis for predicting a range of water quality indices, including the SAR, MH, SP, KR, PS, and ESP, as well as the WQI and IWQI, which provide valuable insights into the water's overall condition. After calculating these indices, an average is determined for each parameter, resulting in a holistic view of the water quality within the region. This average facilitates the classification of the water according to the criteria established in Table 5, which outlines distinct quality classes for both drinking and irrigation purposes.

This classification process is crucial for identifying appropriate uses of water and implementing effective management strategies in cases of non-compliance. Ultimately, such measures contribute to the protection of soil health and safeguard the well-being of users, ensuring sustainable water resource management.
<table><caption>**Table 5.** Classification of Water Quality Based on Various Indices.</caption><thead><tr><th colspan="4">SAR-Based Irrigation Water Classification</th></tr><tr><th>Level</th><th>SAR</th><th>Remark on Quality</th><th>Reference</th></tr></thead><tbody><tr><td>S1</td><td>0-10</td><td>Excellent</td><td rowspan="4">[104]</td></tr><tr><td>S2</td><td>10-18</td><td>Good</td></tr><tr><td>S3</td><td>18-26</td><td>Doubtful</td></tr><tr><td>S4</td><td>>26</td><td>Unsuitable</td></tr></tbody><thead><tr><th colspan="4">SP-Based Irrigation Water Classification</th></tr><tr><th>Level</th><th>Sodium percentage (%)</th><th>Remark on quality</th><th>Reference</th></tr></thead><tbody><tr><td>L1</td><td>&lt;20</td><td>Excellent</td><td rowspan="5">[105]</td></tr><tr><td>L2</td><td>20-40</td><td>Good</td></tr><tr><td>L3</td><td>40-60</td><td>Permissible</td></tr><tr><td>L4</td><td>60-80</td><td>Doubtful</td></tr><tr><td>L5</td><td>>80</td><td>Unsuitable</td></tr></tbody><thead><tr><th colspan="4">KR-Based Irrigation Water Classification</th></tr><tr><th>Level</th><th>KR values</th><th>Remark on quality</th><th>Reference</th></tr></thead><tbody><tr><td>L1</td><td>&lt;1</td><td>Safe</td><td rowspan="2">[106]</td></tr><tr><td>L2</td><td>>1</td><td>Unsafe</td></tr></tbody><thead><tr><th colspan="4">MH-Based Irrigation Water Classification</th></tr><tr><th>Level</th><th>MH values</th><th>Remark on quality</th><th>Reference</th></tr></thead><tbody><tr><td>L1</td><td>&lt;50%</td><td>Safe</td><td rowspan="2">[107]</td></tr><tr><td>L2</td><td>>50%</td><td>Unsafe</td></tr></tbody><thead><tr><th colspan="4">PS-Based Irrigation Water Classification</th></tr><tr><th>Level</th><th>PS values</th><th>Remark on quality</th><th>Reference</th></tr></thead><tbody><tr><td>L1</td><td>&lt;5</td><td>Good</td><td rowspan="3">[106]</td></tr><tr><td>L2</td><td>5 ≤ PS &lt; 10</td><td>Moderate</td></tr><tr><td>L3</td><td>≥10</td><td>Poor</td></tr></tbody><thead><tr><th colspan="4">ESP-Based Irrigation Water Classification</th></tr><tr><th>Level</th><th>ESP values</th><th>Remark on quality</th><th>Reference</th></tr></thead><tbody><tr><td>L1</td><td>&lt;5</td><td>Good</td><td rowspan="3">[108]</td></tr><tr><td>L2</td><td>5 ≤ ESP &lt; 15</td><td>Moderate</td></tr><tr><td>L3</td><td>≥15</td><td>Poor</td></tr></tbody><thead><tr><th colspan="4">Drinking Water WQI Classification</th></tr><tr><th>Level</th><th>WQI values</th><th>Remark on quality</th><th>Reference</th></tr></thead><tbody><tr><td>L1</td><td>Less than 25</td><td>Excellent</td><td rowspan="5">[109]</td></tr><tr><td>L2</td><td>26-50</td><td>Good</td></tr><tr><td>L3</td><td>51-75</td><td>Poor</td></tr><tr><td>L4</td><td>76-100</td><td>Very poor</td></tr><tr><td>L5</td><td>More than 100</td><td>Unsuitable</td></tr></tbody><thead><tr><th colspan="4">IWQI-Based Irrigation Water Classification</th></tr><tr><th>Level</th><th>WQI values</th><th>Remark on quality</th><th>Reference</th></tr></thead><tbody><tr><td>L1</td><td>Less than 150</td><td>Good</td><td rowspan="4">[110]</td></tr><tr><td>L2</td><td>150-300</td><td>Slight</td></tr><tr><td>L3</td><td>301-450</td><td>Moderate</td></tr><tr><td>L4</td><td>More than 450</td><td>Severe</td></tr></tbody></table>

The analysis of water quality involves evaluating various chemical parameters to determine its suitability for human consumption or irrigation purposes [104]. The SAR is a key index used to assess the quality of irrigation water, as it measures the impact of
sodium on soil structure [104]. An SAR value between 0 and 10 indicates excellent quality, with minimal risk of toxicity to plants and good soil structure maintenance. When the SAR exceeds 26, the water is considered unsuitable for irrigation due to the high risk of soil salinization and degradation [104].

The SP is another important indicator of irrigation water quality. An SP below 20% is considered excellent, ensuring no adverse effects on soil structure and plant health [105]. When the SP ranges between 60% and 80%, the water is classified as doubtful for irrigation, requiring corrective measures to limit salinization risks [105]. At above 80%, the water is deemed unsuitable as high sodium levels can degrade soil structure, limit nutrient uptake by plants, and reduce agricultural productivity [105].

KR is used to evaluate the proportion of sodium to other cations present in the water, providing crucial information about the suitability of irrigation water [105]. A KR value below 1 indicates that the water is safe for irrigation, as the sodium proportion is low enough not to compromise crop health or soil quality [105]. On the other hand, a KR value above 1 indicates that the water is hazardous for irrigation, potentially leading to soil salinization and toxic effects on crops [106].

MH is a crucial indicator for determining the safety of irrigation water [107]. An MH value below 50% is considered safe, indicating a low risk to plant health and soil quality. An MH value above 50%, however, is considered hazardous, as it may cause nutrient imbalance, affect plant growth, and alter soil structure [107]. The magnesium ratio is also relevant for drinking water, as high magnesium levels make water hard, alter its taste, and may lead to digestive issues [107].

PS is a key indicator for measuring salt concentration in water. A PS value below 5 is classified as good, indicating a low risk of salt accumulation in the soil [106]. A PS value between 5 and 10 is considered moderate and requires careful monitoring to prevent excessive salt buildup [106]. Finally, a PS value above 10 is considered poor quality for irrigation, as it poses significant salinization risks, adversely affecting crop growth [106]. For drinking water, high chloride and sulfate content impacts the taste and may present health risks, such as gastrointestinal issues [106].

The ESP is used to assess the proportion of exchangeable sodium in the soil due to irrigation [108,111]. An ESP value below 5 is considered good, indicating a low risk of sodium saturation. A value between 5 and 15 is moderate, requiring monitoring to avoid excessive levels [108,111]. Above 15, the ESP is deemed unfavorable, leading to soil structure degradation, reduced permeability, and impaired crop growth [108,111]. However, this indicator is less relevant for drinking water assessment, as it primarily focuses on the effects of sodium on soil rather than human consumption [108,111].

The WQI is used to provide an overall assessment of drinking water quality. A WQI value below 25 indicates excellent quality, suitable for consumption without health risks [112]. When the WQI is between 26 and 50, the water is considered good, though regular monitoring is needed to ensure quality remains adequate [112]. A WQI value between 51 and 75 indicates poor quality, requiring treatment before consumption [109,112,113]. A WQI between 76 and 100 reflects very poor quality, presenting health risks, and a value above 100 makes the water unfit for consumption [109,112,113].

The IWQI is specifically designed to evaluate the quality of water used for irrigation. An IWQI below 150 indicates a quality with no significant risk for irrigation [114]. When the IWQI is between 150 and 300, the water poses a slight risk, requiring management measures to avoid salinization [114]. An IWQI between 301 and 450 indicates moderate quality, signaling an increased risk of salinity or other irrigation-related issues. Above 450, the IWQI is considered severe, indicating a substantial risk of soil degradation and reduced agricultural productivity [110,115].

Among the mentioned indicators, MH, SP, and PS are also relevant for assessing drinking water quality. The magnesium ratio is important because high concentrations can make the water hard, affect its taste, and cause digestive problems [107]. Sodium percentage is crucial, as high sodium content may pose health risks for people with hypertension
and other sodium-related health issues [105]. Potential salinity is relevant for evaluating drinking water quality because high chloride and sulfate content can affect the taste and lead to health problems [106].

On the other hand, other indicators such as SAR, KR, and ESP are mainly used for evaluating the quality of irrigation water, focusing on the effects of sodium on soil structure and permeability rather than drinking water quality [116]. These indices are essential to ensure that irrigation water does not have adverse effects on agricultural productivity and soil sustainability, minimizing the risks of salinization and soil quality deterioration.

### 3.6. Innovative MATLAB Application for Water Quality Prediction and Classification

To simplify the prediction and classification of water quality, an innovative application has been developed using MATLAB (Figure 7). This application is designed to make water analysis more accessible, efficient, and accurate, particularly for assessing water quality for drinking and irrigation purposes. It targets the need for an easy-to-use tool that enables users, such as water quality professionals, field technicians, and farmers, to quickly assess the suitability of water for various applications.

<figure><img src="image_12.png" /><figcaption>**Figure 7.** Application for prediction and classification of water quality.</figcaption></figure>

The core functionality of the application lies in its ability to allow users to input key physico-chemical parameters of water directly into the field “1” (Figure 7). These parameters include conductivity, turbidity, pH, and TDS, which are critical for assessing the overall quality of water. These parameters are easily measurable using portable devices and instruments, which can be operated without requiring complex laboratory setups. Once these input data are collected, the application processes the information using advanced DNNs, which have been trained to predict a range of essential water quality indices.

The DNNs model predicts indices such as the SAR, MH, SP, KR, PS, ESP, and two important water quality indices: WQI and IWQI. These indices are crucial for evaluating water quality and determining its suitability for various uses. For instance, SAR, ESP, and WQI are particularly important for assessing water for agricultural irrigation, while the WQI and other indices also offer insights into water suitability for human consumption.

By utilizing DNNs, the application leverages the power of artificial intelligence to analyze large volumes of complex data and make accurate predictions. This not only enhances the precision of water quality assessments but also reduces the time required for
these analyses. Rather than performing manual calculations for each index, which can be error-prone and time-consuming, users can quickly obtain results through the application. This streamlines the process, helping to facilitate faster decision-making.

The predicted water quality indices can then be used to evaluate the overall quality of the water. These predictions are crucial for classifying water according to established standards for drinking or irrigation purposes. The classification helps identify if the water meets the necessary criteria for safe and sustainable use. In cases where the water quality does not meet the required standards, the application provides immediate feedback, helping users pinpoint areas for improvement or corrective measures that can be implemented to address non-compliance. For example, it may suggest methods for treating water to improve its quality or recommend alternative sources for irrigation.

In summary, this MATLAB application not only provides accurate predictions of various water quality indices but also significantly simplifies the process of classifying water based on its suitability for different purposes. It reduces the need for manual calculations, saving both time and effort, while improving accuracy and reliability. By providing water quality predictions in real-time, this application empowers water resource managers, environmental engineers, and farmers to make informed decisions. It ultimately contributes to better management of water resources, improving the sustainability of water usage and ensuring that water remains safe for consumption and agricultural practices.

## 4. Discussion

In this study, an innovative approach leveraging AI was employed to predict water quality parameters using field-measurable physicochemical data. This methodology offers a significant improvement over traditional methods for classifying drinking and irrigation water quality, addressing their limitations and enhancing water resource management [117,118].

One of the key advantages of this AI-driven approach is its ability to reduce reliance on complex and resource-intensive laboratory analyses. Traditional methods often require expensive, time-consuming tests, specialized equipment, and highly trained personnel [119,120]. By contrast, this study focused on using easily measurable parameters, such as conductivity, turbidity, pH, and TDS, which can be quickly obtained with portable devices. This transition streamlines the assessment process, democratizes access to water quality monitoring, and empowers field personnel to make informed decisions without delays associated with laboratory testing [121,122].

The ability to conduct real-time monitoring is a game-changer in water quality management. By integrating AI, the proposed methodology facilitates immediate data analysis and interpretation, enabling water managers to identify deviations from quality standards promptly and respond swiftly to potential health risks [121,123]. This immediacy is particularly vital in regions where water contamination poses significant public health challenges. Providing field personnel with AI tools for real-time analysis enhances both the speed and effectiveness of responses to emerging issues [121].

At the heart of this approach lies the application of machine learning algorithms capable of analyzing extensive datasets to identify patterns and correlations between physicochemical measurements and historical laboratory results. By training AI models on comprehensive datasets—including seasonal variations and diverse geographical conditions—the system becomes adept at generating accurate predictions about water quality [124]. This predictive capability allows stakeholders to anticipate issues rather than merely react to them, supporting proactive water management.

Another major strength of this AI-based methodology is its inherent flexibility and adaptability. Regional environmental characteristics and water quality parameters often vary significantly based on local conditions [125]. Tailoring AI models to reflect the specific needs and features of various water sources ensures that predictions remain relevant and contextually accurate [126]. This localized approach empowers water managers to develop
targeted strategies for treatment and resource management, significantly improving the effectiveness of interventions [127].

Beyond technical advantages, this methodology also aligns with broader sustainability goals. By minimizing the need for laboratory analyses, it reduces operational costs and resource consumption. Additionally, the decreased reliance on transporting samples to centralized laboratories lowers carbon emissions associated with travel, contributing to environmental sustainability [128]. In the face of global challenges like climate change and resource scarcity, implementing such innovative solutions is critical to promoting sustainable water management practices [129,130].

Real-time on-site results empower decision-makers to take immediate action in response to detected water quality issues. This proactive approach not only mitigates risks to public health but also optimizes overall water resource management [120,131–134]. By leveraging AI-driven predictions, stakeholders can make data-informed decisions regarding water usage, treatment strategies, and compliance with regulations, ensuring sustainable and effective water resource utilization.

This study has also highlighted the significant potential of DNNs to predict and classify water quality parameters based on field-measurable physicochemical data. While the methodology is robust and precise within the Médéa region of Algeria, further exploration is needed to validate its applicability in diverse contexts and address potential limitations.

The model was developed and tested using samples collected in a geographically diverse environment encompassing Mediterranean and semi-arid zones, demonstrating its adaptability to varied conditions within a single region. However, its application in other contexts, such as coastal areas with high salinity, tropical zones rich in organic matter, or industrialized regions with heavy metal contamination, remains to be fully validated. Incorporating data from such diverse environments would broaden the training dataset and enhance the model's global applicability.

Future research should aim to test the model's generalizability through comparative studies across regions with varying climates and diverse water sources, including ground-water and surface water impacted by industrial or agricultural activities. Although this AI-based methodology offers remarkable advancements in speed, accuracy, and accessibility for water quality monitoring, additional efforts are necessary to ensure its validity and sustainability in diverse scenarios. The adoption of a global dataset and testing under varied conditions will bolster its potential as a universal tool for sustainable water resource management.

## 5. Conclusions

This study demonstrates the significant potential of artificial intelligence (AI), particularly deep neural networks (DNNs), for improving the prediction and classification of water quality based on readily measurable physico-chemical parameters. By integrating AI models, accurate predictions of key water quality indices such as the sodium adsorption ratio (SAR), magnesium hazard (MH), sodium percentage (SP), Kelley's ratio (KR), potential salinity (PS), exchangeable sodium percentage (ESP), as well as Water Quality Index (WQI) and Irrigation Water Quality Index (IWQI) were achieved. The results underscore the capacity of AI-driven approaches to enhance the speed, precision, and accessibility of water quality assessments, particularly in regions where traditional methods are limited by resource constraints. The developed model exhibits high predictive accuracy, with correlation coefficients nearing unity and minimal root mean square errors, thereby demonstrating its robustness. Furthermore, the ability to generate real-time assessments allows for rapid responses to emerging water quality issues, making this methodology particularly relevant for sustainable water resource management in the face of increasing pollution and climate change challenges. The presented approach not only reduces dependency on complex and time-consuming laboratory analyses but also promotes environmentally sustainable practices by minimizing the need for transportation and large-scale infrastructure. This innovative application of AI offers a valuable tool for water managers, facilitating informed
decision-making processes that can improve both public health outcomes and agricultural productivity. Future work should explore the scalability of this methodology across different geographical and environmental conditions and extend its application to a wider range of water quality parameters. The continued integration of advanced AI techniques in environmental monitoring holds the promise of revolutionizing water quality management on a global scale.

**Author Contributions:** Conceptualization, S.T., S.L., N.T., H.M., N.E., R.B., O.B., M.K., S.D., J.Z., A.A. and H.T.; Data curation, J.Z., A.A. and H.T.; Formal analysis, S.T., S.L., N.T., H.M., N.E., R.B., O.B., M.K., S.D., J.Z., A.A. and H.T.; Investigation, S.T., S.L., N.T., H.M., N.E., R.B., O.B., M.K., S.D., J.Z., A.A. and H.T.; Methodology, S.T., N.T., H.M., N.E., R.B., O.B., M.K., S.D., J.Z., A.A. and H.T.; Project administration, N.E., M.K., S.D., J.Z., A.A. and H.T.; Resources, S.T., S.L., N.E., R.B., M.K., S.D., J.Z., A.A. and H.T.; Software, H.M., M.K., J.Z., A.A. and H.T.; Supervision, J.Z., A.A. and H.T.; Validation, S.T., S.L., N.T., H.M., N.E., R.B., O.B., M.K., S.D., J.Z., A.A. and H.T.; Visualization, S.T., S.L., N.T., H.M., N.E., R.B., O.B., M.K., S.D., J.Z., A.A. and H.T.; Writing—original draft, S.T. and H.T.; Writing—review and editing, S.L., N.T., H.M., N.E., R.B., O.B., M.K., S.D., J.Z., A.A. and H.T. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Data Availability Statement:** All relevant data are included within the article.

**Conflicts of Interest:** The authors declare no conflicts of interest.

## References

1. Kebir, M.; Tahraoui, H.; Chabani, M.; Trari, M.; Noureddine, N.; Assadi, A.A.; Amrane, A.; Ben Hamadi, N.; Khezami, L. Water Cleaning by a Continuous Fixed-Bed Column for Cr (VI) Eco-Adsorption with Green Adsorbent-Based Biomass: An Experimental Modeling Study. *Processes* **2023**, *11*, 363. [CrossRef]

2. Jackson, R.B.; Carpenter, S.R.; Dahm, C.N.; McKnight, D.M.; Naiman, R.J.; Postel, S.L.; Running, S.W. Water in a Changing World. *Ecol. Appl.* **2001**, *11*, 1027–1045. [CrossRef]

3. Tahraoui, H.; Toumi, S.; Boudoukhani, M.; Touzout, N.; Sid, A.N.E.H.; Amrane, A.; Belhadj, A.-E.; Hadjadj, M.; Laichi, Y.; Aboumustapha, M. Evaluating the Effectiveness of Coagulation–Flocculation Treatment Using Aluminum Sulfate on a Polluted Surface Water Source: A Year-Long Study. *Water* **2024**, *16*, 400. [CrossRef]

4. Alcamo, J. Water Quality and Its Interlinkages with the Sustainable Development Goals. *Curr. Opin. Environ. Sustain.* **2019**, *36*, 126–140. [CrossRef]

5. Myers, S.S.; Patz, J.A. Emerging Threats to Human Health from Global Environmental Change. *Annu. Rev. Environ. Resour.* **2009**, *34*, 223–252. [CrossRef]

6. Feldman, D.L. *Water*; John Wiley & Sons: Hoboken, NJ, USA, 2013; ISBN 0-7456-7420-8.

7. Orebiyi, O.; Awomeso, A. Water and Pollution Agents in the 21st Century. *Nat. Sci.* **2008**, *6*, 16–24.

8. Haque, S.E. Urban Water Pollution by Heavy Metals, Microplastics, and Organic Contaminants. In *Current Directions in Water Scarcity Research*; Elsevier: Amsterdam, The Netherlands, 2022; Volume 6, pp. 21–43, ISBN 2542-7946.

9. Raju, M.; Gandhimathi, R.; Nidheesh, P. The Cause, Fate and Effect of Microplastics in Freshwater Ecosystem: Ways to Overcome the Challenge. *J. Water Process Eng.* **2023**, *55*, 104199. [CrossRef]

10. Dehbi, M.; Dehbi, F.; Kanjal, M.I.; Tahraoui, H.; Zamouche, M.; Amrane, A.; Assadi, A.A.; Hadadi, A.; Mouni, L. Analysis of Heavy Metal Contamination in Macroalgae from Surface Waters in Djelfa, Algeria. *Water* **2023**, *15*, 974. [CrossRef]

11. Sonone, S.S.; Jadhav, S.; Sankhla, M.S.; Kumar, R. Water Contamination by Heavy Metals and Their Toxic Effect on Aquaculture and Human Health through Food Chain. *Lett. Appl. NanoBioSci.* **2020**, *10*, 2148–2166.

12. Bashir, I.; Lone, F.A.; Bhat, R.A.; Mir, S.A.; Dar, Z.A.; Dar, S.A. Concerns and Threats of Contamination on Aquatic Ecosystems. In *Bioremediation and Biotechnology*; Springer: Cham, Switzerland, 2020; Volumes 1–26.

13. Xia, Y.; Zhang, M.; Tsang, D.C.; Geng, N.; Lu, D.; Zhu, L.; Igalavithana, A.D.; Dissanayake, P.D.; Rinklebe, J.; Yang, X. Recent Advances in Control Technologies for Non-Point Source Pollution with Nitrogen and Phosphorous from Agricultural Runoff: Current Practices and Future Prospects. *Appl. Biol. Chem.* **2020**, *63*, 8. [CrossRef]

14. Campbell, N.; D'Arcy, B.; Frost, A.; Novotny, V.; Sansom, A. *Diffuse Pollution*; IWA Publishing: London, UK, 2005; ISBN 1-900222-53-1.

15. Altenburger, R.; Brack, W.; Burgess, R.M.; Busch, W.; Escher, B.I.; Focks, A.; Mark Hewitt, L.; Jacobsen, B.N.; de Alda, M.L.; Ait-Aissa, S. Future Water Quality Monitoring: Improving the Balance between Exposure and Toxicity Assessments of Real-World Pollutant Mixtures. *Environ. Sci. Eur.* **2019**, *31*, 12. [CrossRef]

16. Sanders, T.G. *Design of Networks for Monitoring Water Quality*; Water Resources Publication: Littleton, CO, USA, 1983; ISBN 0-918334-51-9.
17. Glasgow, H.B.; Burkholder, J.M.; Reed, R.E.; Lewitus, A.J.; Kleinman, J.E. Real-Time Remote Monitoring of Water Quality: A Review of Current Applications, and Advancements in Sensor, Telemetry, and Computing Technologies. *J. Exp. Mar. Biol. Ecol.* **2004**, *300*, 409–448. [CrossRef]

18. Bangira, T.; Matongera, T.N.; Mabhaudhi, T.; Mutanga, O. Remote Sensing-Based Water Quality Monitoring in African Reservoirs, Potential and Limitations of Sensors and Algorithms: A Systematic Review. *Phys. Chem. Earth Parts A/B/C* **2023**, *134*, 103536. [CrossRef]

19. Alogayell, H.M.; EL-Bana, E.M.M.; Abdelfattah, M. Groundwater Quality and Suitability Assessment for Irrigation Using Hydrogeochemical Characteristics and Pollution Indices: A Case Study of North Al-Quwayiyah Governorate, Central Saudi Arabia. *Water* **2023**, *15*, 3321. [CrossRef]

20. Singh, S.K.; Bharose, R.; Nemčić-Jurec, J.; Rawat, K.S.; Singh, D. Irrigation Water Quality Appraisal Using Statistical Methods and WATEQ4F Geochemical Model. In *Agricultural Water Management*; Elsevier: Amsterdam, The Netherlands, 2021; pp. 101–138.

21. Gharbi, A.; Ali, Z.I.; Zairi, M. Groundwater Suitability for Drinking and Agriculture Purposes Using Irrigation Water Quality Index and Multivariate Analysis: Case of Sidi Bouzid Aquifer, Central Tunisia. *Environ. Earth Sci.* **2019**, *78*, 692. [CrossRef]

22. Rufino, F.; Busico, G.; Cuoco, E.; Darrah, T.H.; Tedesco, D. Evaluating the Suitability of Urban Groundwater Resources for Drinking Water and Irrigation Purposes: An Integrated Approach in the Agro-Aversano Area of Southern Italy. *Environ. Monit. Assess.* **2019**, *191*, 768. [CrossRef]

23. Tsatsaris, A.; Kalogeropoulos, K.; Stathopoulos, N.; Louka, P.; Tsanakas, K.; Tsesmelis, D.E.; Krassanakis, V.; Petropoulos, G.P.; Pappas, V.; Chalkias, C. Geoinformation Technologies in Support of Environmental Hazards Monitoring under Climate Change: An Extensive Review. *ISPRS Int. J. Geo-Inf.* **2021**, *10*, 94. [CrossRef]

24. Gholizadeh, M.H.; Melesse, A.M.; Reddi, L. A Comprehensive Review on Water Quality Parameters Estimation Using Remote Sensing Techniques. *Sensors* **2016**, *16*, 1298. [CrossRef]

25. Xue, D.; Botte, J.; De Baets, B.; Accoe, F.; Nestler, A.; Taylor, P.; Van Cleemput, O.; Berglund, M.; Boeckx, P. Present Limitations and Future Prospects of Stable Isotope Methods for Nitrate Source Identification in Surface-and Groundwater. *Water Res.* **2009**, *43*, 1159–1170. [CrossRef]

26. Barnes, D.F.; Floor, W.M. Rural Energy in Developing Countries: A Challenge for Economic Development. *Annu. Rev. Energy Environ.* **1996**, *21*, 497–530. [CrossRef]

27. World Health Organization. *Local Production and Technology Transfer to Increase Access to Medical Devices: Addressing the Barriers and Challenges in Low-And Middle-Income Countries*; World Health Organization: Geneva, Switzerland, 2012.

28. Nichol, G.; Thomas, E.; Callaway, C.W.; Hedges, J.; Powell, J.L.; Aufderheide, T.P.; Rea, T.; Lowe, R.; Brown, T.; Dreyer, J. Regional Variation in Out-of-Hospital Cardiac Arrest Incidence and Outcome. *JAMA* **2008**, *300*, 1423–1431. [CrossRef]

29. Reap, J.; Roman, F.; Duncan, S.; Bras, B. A Survey of Unresolved Problems in Life Cycle Assessment: Part 2: Impact Assessment and Interpretation. *Int. J. Life Cycle Assess.* **2008**, *13*, 374–388. [CrossRef]

30. Edition, F. Guidelines for Drinking-Water Quality. *WHO Chron.* **2011**, 38, 104–108.

31. World Health Organization. *Guidelines for Drinking-Water Quality: Incorporating the First and Second Addenda*; World Health Organization: Geneva, Switzerland, 2022; ISBN 92-4-004506-6.

32. Diaz, J.V.; Riviello, E.D.; Papali, A.; Adhikari, N.K.; Ferreira, J.C. Global Critical Care: Moving Forward in Resource-Limited Settings. *Ann. Glob. Health* **2019**, *85*, 3. [CrossRef]

33. Kazi, T.; Arain, M.; Jamali, M.K.; Jalbani, N.; Afridi, H.; Sarfraz, R.; Baig, J.; Shah, A.Q. Assessment of Water Quality of Polluted Lake Using Multivariate Statistical Techniques: A Case Study. *Ecotoxicol. Environ. Saf.* **2009**, *72*, 301–309. [CrossRef]

34. Brack, W.; Altenburger, R.; Schüürmann, G.; Krauss, M.; Herráez, D.L.; van Gils, J.; Slobodnik, J.; Munthe, J.; Gawlik, B.M.; van Wezel, A. The SOLUTIONS Project: Challenges and Responses for Present and Future Emerging Pollutants in Land and Water Resources Management. *Sci. Total Environ.* **2015**, *503*, 22–31. [CrossRef]

35. Tung, T.M.; Yaseen, Z.M. A Survey on River Water Quality Modelling Using Artificial Intelligence Models: 2000–2020. *J. Hydrol.* **2020**, *585*, 124670.

36. Nagpal, M.; Siddique, M.A.; Sharma, K.; Sharma, N.; Mittal, A. Optimizing Wastewater Treatment through Artificial Intelligence: Recent Advances and Future Prospects. *Water Sci. Technol.* **2024**, *90*, 731–757. [CrossRef]

37. Hussein, E.E.; Derdour, A.; Zerouali, B.; Almaliki, A.; Wong, Y.J.; Ballesta-de los Santos, M.; Minh Ngoc, P.; Hashim, M.A.; Elbeltagi, A. Groundwater Quality Assessment and Irrigation Water Quality Index Prediction Using Machine Learning Algorithms. *Water* **2024**, *16*, 264. [CrossRef]

38. Ajayi, O.O.; Bagula, A.B.; Maluleke, H.C.; Gaffoor, Z.; Jovanovic, N.; Pietersen, K.C. Waternet: A Network for Monitoring and Assessing Water Quality for Drinking and Irrigation Purposes. *IEEE Access* **2022**, *10*, 48318–48337. [CrossRef]

39. Trabelsi, F.; Bel Hadj Ali, S. Exploring Machine Learning Models in Predicting Irrigation Groundwater Quality Indices for Effective Decision Making in Medjerda River Basin, Tunisia. *Sustainability* **2022**, *14*, 2341. [CrossRef]

40. Ahmed, A.K.A.; El-Rawy, M.; Ibraheem, A.M.; Al-Arifi, N.; Abd-Ellah, M.K. Forecasting of Groundwater Quality by Using Deep Learning Time Series Techniques in an Arid Region. *Sustainability* **2023**, *15*, 6529. [CrossRef]

41. Jaffar, A.; Thamrin, N.M.; Megat Ali, M.S.A.; Misnan, M.F.; Mohd Yassin, A.I. The Influence of Physico-Chemical Parameters to Determine Water Quality: A Review. *J. Electr. Electron. Syst. Res.* **2020**, *17*, 116–121. [CrossRef]

42. Ahmed, U.; Mumtaz, R.; Anwar, H.; Mumtaz, S.; Qamar, A.M. Water Quality Monitoring: From Conventional to Emerging Technologies. *Water Supply* **2020**, *20*, 28–45. [CrossRef]
43. Bedell, E.; Harmon, O.; Fankhauser, K.; Shivers, Z.; Thomas, E. A Continuous, in-Situ, near-Time Fluorescence Sensor Coupled with a Machine Learning Model for Detection of Fecal Contamination Risk in Drinking Water: Design, Characterization and Field Validation. *Water Res.* **2022**, *220*, 118644. [CrossRef]

44. Taşan, S. Estimation of Groundwater Quality Using an Integration of Water Quality Index, Artificial Intelligence Methods and GIS: Case Study, Central Mediterranean Region of Turkey. *Appl. Water Sci.* **2023**, *13*, 15. [CrossRef]

45. Nguyen, D.-V.; Wang, S.; Nguyen, D.-P.; Ching, P.M.L.; Shim, J.H.; Jung, Y.; Wu, D.; So, R.H. Current Developments in Machine Learning Models with Boosting Algorithms for the Prediction of Water Quality. *Water Secur. Big Data Driven Risk Identif. Assess. Control. Emerg. Contam.* **2024**, *1*, 575–591.

46. Elenchezhian, M.R.P.; Vadlamudi, V.; Raihan, R.; Reifsnider, K.; Reifsnider, E. Artificial Intelligence in Real-Time Diagnostics and Prognostics of Composite Materials and Its Uncertainties—A Review. *Smart Mater. Struct.* **2021**, *30*, 083001. [CrossRef]

47. Yaroshenko, I.; Kirsanov, D.; Marjanovic, M.; Lieberzeit, P.A.; Korostynska, O.; Mason, A.; Frau, I.; Legin, A. Real-Time Water Quality Monitoring with Chemical Sensors. *Sensors* **2020**, *20*, 3432. [CrossRef]

48. Leal Filho, W.; Wall, T.; Mucova, S.A.R.; Nagy, G.J.; Balogun, A.-L.; Luetz, J.M.; Ng, A.W.; Kovaleva, M.; Azam, F.M.S.; Alves, F. Deploying Artificial Intelligence for Climate Change Adaptation. *Technol. Forecast. Soc. Chang.* **2022**, *180*, 121662. [CrossRef]

49. Pérez-Beltrán, C.; Robles, A.; Rodriguez, N.; Ortega-Gavilán, F.; Jiménez-Carvelo, A. Artificial Intelligence and Water Quality: From Drinking Water to Wastewater. *TrAC Trends Anal. Chem.* **2024**, *172*, 117597. [CrossRef]

50. Shaheen, S.A.; Lipman, T.E. Reducing Greenhouse Emissions and Fuel Consumption: Sustainable Approaches for Surface Transportation. *IATSS Res.* **2007**, *31*, 6–20. [CrossRef]

51. Chester, M.V.; Horvath, A. Environmental Assessment of Passenger Transportation Should Include Infrastructure and Supply Chains. *Environ. Res. Lett.* **2009**, *4*, 024008. [CrossRef]

52. Lenzen, M.; Lundie, S.; Bransgrove, G.; Charet, L.; Sack, F. Assessing the Ecological Footprint of a Large Metropolitan Water Supplier: Lessons for Water Management and Planning towards Sustainability. *J. Environ. Plan. Manag.* **2003**, *46*, 113–141. [CrossRef]

53. Volenzo, T.E.; Odiyo, J. Ecological Public Health and Participatory Planning and Assessment Dilemmas: The Case of Water Resources Management. *Int. J. Environ. Res. Public Health* **2018**, *15*, 1635. [CrossRef]

54. Rodier, J.; Legube, B.; Merlet, N. *L'analyse de l'eau, 10e Éd.*; Dunod: Malakoff, France, 2016. Available online: https://www.dunod.com/sciences-techniques/analyse-eau-eaux-naturelles-eaux-residuaires-eau-mer-0 (accessed on 10 October 2024).

55. Sattari, M.T.; Farkhondeh, A.; Patrick Abraham, J. Estimation of Sodium Adsorption Ratio Indicator Using Data Mining Methods: A Case Study in Urmia Lake Basin, Iran. *Environ. Sci. Pollut. Res.* **2018**, *25*, 4776–4786. [CrossRef]

56. Narasaiah, V.; Rao, B.V. Groundwater Quality of an Hard Rock Aquifer in the Subledu Basin of Khammam District, India. *Appl. Water Sci.* **2021**, *11*, 89. [CrossRef]

57. Muniz, G.L.; Oliveira, A.L.G.; Benedito, M.G.; Cano, N.D.; de Camargo, A.P.; Silva, A.J. da Risk Evaluation of Chemical Clogging of Irrigation Emitters via Geostatistics and Multivariate Analysis in the Northern Region of Minas Gerais, Brazil. *Water* **2023**, *15*, 790. [CrossRef]

58. El Bilali, A.; Taleb, A.; Brouziyne, Y. Groundwater Quality Forecasting Using Machine Learning Algorithms for Irrigation Purposes. *Agric. Water Manag.* **2021**, *245*, 106625. [CrossRef]

59. Mohanavelu, A.; Naganna, S.R.; Al-Ansari, N. Irrigation Induced Salinity and Sodicity Hazards on Soil and Groundwater: An Overview of Its Causes, Impacts and Mitigation Strategies. *Agriculture* **2021**, *11*, 983. [CrossRef]

60. Pessoa, L.G.; dos S. Freire, M.B.; Green, C.H.; Miranda, M.F.; de A. Filho, J.C.; Pessoa, W.R. Assessment of Soil Salinity Status under Different Land-Use Conditions in the Semiarid Region of Northeastern Brazil. *Ecol. Indic.* **2022**, *141*, 109139. [CrossRef]

61. Mammeri, A.; Tiri, A.; Belkhiri, L.; Salhi, H.; Brella, D.; Lakouas, E.; Tahraoui, H.; Amrane, A.; Mouni, L. Assessment of Surface Water Quality Using Water Quality Index and Discriminant Analysis Method. *Water* **2023**, *15*, 680. [CrossRef]

62. Gao, Y.; Qian, H.; Ren, W.; Wang, H.; Liu, F.; Yang, F. Hydrogeochemical Characterization and Quality Assessment of Groundwater Based on Integrated-Weight Water Quality Index in a Concentrated Urban Area. *J. Clean. Prod.* **2020**, *260*, 121006. [CrossRef]

63. Shil, S.; Singh, U.K.; Mehta, P. Water Quality Assessment of a Tropical River Using Water Quality Index (WQI), Multivariate Statistical Techniques and GIS. *Appl. Water Sci.* **2019**, *9*, 168. [CrossRef]

64. Wang, Y.; Li, R.; Wu, X.; Yan, Y.; Wei, C.; Luo, M.; Xiao, Y.; Zhang, Y. Evaluation of Groundwater Quality for Drinking and Irrigation Purposes Using GIS-Based IWQI, EWQI and HHR Model. *Water* **2023**, *15*, 2233. [CrossRef]

65. Peña, F.J.; Hübinger, C.; Payberah, A.H.; Jaramillo, F. DeepAqua: Semantic Segmentation of Wetland Water Surfaces with SAR Imagery Using Deep Neural Networks without Manually Annotated Data. *Int. J. Appl. Earth Obs. Geoinf.* **2024**, *126*, 103624. [CrossRef]

66. Hatcher, W.G.; Yu, W. A Survey of Deep Learning: Platforms, Applications and Emerging Research Trends. *IEEE Access* **2018**, *6*, 24411–24432. [CrossRef]

67. El-Shebli, M.; Sharrab, Y.; Al-Fraihat, D. Prediction and Modeling of Water Quality Using Deep Neural Networks. *Environ. Dev. Sustain.* **2023**, *26*, 11397–11430. [CrossRef]

68. Zhai, Y.; Rashmi, R.; Palos, E.; Paesani, F. Many-Body Interactions and Deep Neural Network Potentials for Water. *J. Chem. Phys.* **2024**, *160*, 144501. [CrossRef]

69. Nakada, R.; Imaizumi, M. Adaptive Approximation and Generalization of Deep Neural Network with Intrinsic Dimensionality. *J. Mach. Learn. Res.* **2020**, *21*, 1–38.
70. Talukdar, S.; Ahmed, S.; Naikoo, M.W.; Rahman, A.; Mallik, S.; Ningthoujam, S.; Bera, S.; Ramana, G.V. Predicting Lake Water Quality Index with Sensitivity-Uncertainty Analysis Using Deep Learning Algorithms. *J. Clean. Prod.* **2023**, *406*, 136885. [CrossRef]

71. St-Yves, G.; Allen, E.J.; Wu, Y.; Kay, K.; Naselaris, T. Brain-Optimized Deep Neural Network Models of Human Visual Areas Learn Non-Hierarchical Representations. *Nat. Commun.* **2023**, *14*, 3329. [CrossRef]

72. Emadi, M.; Taghizadeh-Mehrjardi, R.; Cherati, A.; Danesh, M.; Mosavi, A.; Scholten, T. Predicting and Mapping of Soil Organic Carbon Using Machine Learning Algorithms in Northern Iran. *Remote Sens.* **2020**, *12*, 2234. [CrossRef]

73. Li, W.; Zhao, Y.; Zhu, Y.; Dong, Z.; Wang, F.; Huang, F. Research Progress in Water Quality Prediction Based on Deep Learning Technology: A Review. *Environ. Sci. Pollut. Res.* **2024**, *31*, 26415-26431. [CrossRef]

74. Irwan, D.; Ali, M.; Ahmed, A.N.; Jacky, G.; Nurhakim, A.; Ping Han, M.C.; AlDahoul, N.; El-Shafie, A. Predicting Water Quality with Artificial Intelligence: A Review of Methods and Applications. *Arch. Comput. Methods Eng.* **2023**, *30*, 4633-4652. [CrossRef]

75. Han, S.; Choi, H.-S.; Choi, J.; Choi, J.H.; Kim, J.-G. A DNN-Based Data-Driven Modeling Employing Coarse Sample Data for Real-Time Flexible Multibody Dynamics Simulations. *Comput. Methods Appl. Mech. Eng.* **2021**, *373*, 113480. [CrossRef]

76. Huang, L.; Qin, J.; Zhou, Y.; Zhu, F.; Liu, L.; Shao, L. Normalization Techniques in Training Dnns: Methodology, Analysis and Application. *IEEE Trans. Pattern Anal. Mach. Intell.* **2023**, *45*, 10173-10196. [CrossRef]

77. Yong, H.; Huang, J.; Hua, X.; Zhang, L. Gradient Centralization: A New Optimization Technique for Deep Neural Networks. In *Computer Vision-ECCV 2020; Vedaldi, A., Bischof, H., Brox, T., Frahm, J.-M., Eds.; Lecture Notes in Computer Science; Springer International Publishing: Cham, Switzerland, 2020; Volume 12346, pp. 635-652*, ISBN 978-3-030-58451-1.

78. Shrestha, A.; Mahmood, A. Review of Deep Learning Algorithms and Architectures. *IEEE Access* **2019**, *7*, 53040-53065. [CrossRef]

79. Jin, Y.; Wang, H.; Chugh, T.; Guo, D.; Miettinen, K. Data-Driven Evolutionary Optimization: An Overview and Case Studies. *IEEE Trans. Evol. Comput.* **2018**, *23*, 442-458. [CrossRef]

80. Tahraoui, H.; Toumi, S.; Hassein-Bey, A.H.; Bousselma, A.; Sid, A.N.E.H.; Belhadj, A.-E.; Triki, Z.; Kebir, M.; Amrane, A.; Zhang, J. Advancing Water Quality Research: K-Nearest Neighbor Coupled with the Improved Grey Wolf Optimizer Algorithm Model Unveils New Possibilities for Dry Residue Prediction. *Water* **2023**, *15*, 2631. [CrossRef]

81. Smara, M.; Khalladi, R.; Moulai-Mostefa, N.; Madi, K.; Mansour, D.; Lekmine, S.; Benslama, O.; Tahraoui, H.; Zhang, J.; Amrane, A. Efficiency of Hydrogen Peroxide and Fenton Reagent for Polycyclic Aromatic Hydrocarbon Degradation in Contaminated Soil: Insights from Experimental and Predictive Modeling. *Processes* **2024**, *12*, 621. [CrossRef]

82. Kebir, M.; Benramdhan, I.-K.; Nasrallah, N.; Tahraoui, H.; Bait, N.; Benaissa, H.; Ameraoui, R.; Zhang, J.; Assadi, A.A.; Mouni, L. Surface Response Modeling of Homogeneous Photo Fenton Fe (III) and Fe (II) Complex for Sunlight Degradation and Mineralization of Food Dye. *Catal. Commun.* **2023**, *183*, 106780. [CrossRef]

83. Nedjhioui, M.; Nasrallah, N.; Kebir, M.; Tahraoui, H.; Bouallouche, R.; Assadi, A.A.; Amrane, A.; Jaouadi, B.; Zhang, J.; Mouni, L. Designing an Efficient Surfactant-Polymer-Oil-Electrolyte System: A Multi-Objective Optimization Study. *Processes* **2023**, *11*, 1314. [CrossRef]

84. Hamri, N.; Imessaoudene, A.; Hadadi, A.; Cheikh, S.; Boukerroui, A.; Bollinger, J.-C.; Amrane, A.; Tahraoui, H.; Tran, H.N.; Ezzat, A.O. Enhanced Adsorption Capacity of Methylene Blue Dye onto Kaolin through Acid Treatment: Batch Adsorption and Machine Learning Studies. *Water* **2024**, *16*, 243. [CrossRef]

85. Yahoum, M.M.; Toumi, S.; Hentabli, S.; Tahraoui, H.; Lefnaoui, S.; Hadjsadok, A.; Amrane, A.; Kebir, M.; Moula, N.; Assadi, A.A. Experimental Analysis and Neural Network Modeling of the Rheological Behavior of Xanthan Gum and Its Derivatives. *Materials* **2023**, *16*, 2565. [CrossRef]

86. Mechati, S.; Zamouche, M.; Tahraoui, H.; Filali, O.; Mazouz, S.; Bouledjemer, I.N.E.; Toumi, S.; Triki, Z.; Amrane, A.; Kebir, M. Modeling and Optimization of Hybrid Fenton and Ultrasound Process for Crystal Violet Degradation Using AI Techniques. *Water* **2023**, *15*, 4274. [CrossRef]

87. Guediri, A.; Bouguettoucha, A.; Tahraoui, H.; Chebli, D.; Zhang, J.; Amrane, A.; Khezami, L.; Assadi, A.A. The Enhanced Adsorption Capacity of Ziziphus Jujuba Stones Modified with Ortho-Phosphoric Acid for Organic Dye Removal: A Gaussian Process Regression Approach. *Water* **2024**, *16*, 1208. [CrossRef]

88. Guediri, A.; Bouguettoucha, A.; Tahraoui, H.; Chebli, D.; Amrane, A.; Zhang, J. Thermodynamic Study and the Development of a Support Vector Machine Model for Predicting Adsorption Behavior of Orange Peel-Derived Beads in Wastewater Treatment. *J. Mol. Liq.* **2024**, *403*, 124860. [CrossRef]

89. Benkouachi, O.R.; Bouguettoucha, A.; Tahraoui, H.; Guediri, A.; Chebli, D.; Kebir, M.; Knani, S.; Zhang, J.; Amrane, A. Advanced Green Peel Utilization for Efficient Methylene Blue Removal: Integrated Analysis and Predictive Modeling. *J. Mol. Liq.* **2024**, *413*, 125951. [CrossRef]

90. Harizi, I.; Aldahri, T.; Chebli, D.; Tahraoui, H.; Bouguettoucha, A.; Rohani, S.; Zhang, J.; Amrane, A. Gaussian Process Regression with Levy Flight Optimization: Advanced AR66 Adsorption Studies. *Chem. Eng. Res. Des.* **2024**, *207*, 192-208. [CrossRef]

91. Gustineli, M. A Survey on Recently Proposed Activation Functions for Deep Learning. *arXiv* **2022**, arXiv:2204.02921.

92. Liu, X.; Di, X. TanhExp: A Smooth Activation Function with High Convergence Speed for Lightweight Neural Networks. *IET Comput. Vis.* **2021**, *15*, 136-150. [CrossRef]

93. Mahima, R.; Maheswari, M.; Roshana, S.; Priyanka, E.; Mohanan, N.; Nandhini, N. A Comparative Analysis of the Most Commonly Used Activation Functions in Deep Neural Network. In Proceedings of the 2023 4th International Conference on Electronics and Sustainable Communication Systems (ICESC), Coimbatore, India, 6-8 July 2023; pp. 1334-1339.
94. Szandała, T. Review and Comparison of Commonly Used Activation Functions for Deep Neural Networks. In *Bio-Inspired Neurocomputing*; Bhoi, A.K., Mallick, P.K., Liu, C.-M., Balas, V.E., Eds.; Studies in Computational Intelligence; Springer Singapore: Singapore, 2021; Volume 903, pp. 203–224, ISBN 9789811554940.

95. Lauzon, F.Q. An Introduction to Deep Learning. In Proceedings of the 2012 11th International Conference on Information Science, Signal Processing and Their Applications (ISSPA), Montreal, QC, Canada, 2–5 July 2012; pp. 1438–1439.

96. Banerjee, C.; Mukherjee, T.; Pasiliao, E. Feature Representations Using the Reflected Rectified Linear Unit (RReLU) Activation. *Big Data Min. Anal.* **2020**, *3*, 102–120. [CrossRef]

97. Tahraoui, H.; Belhadj, A.-E.; Hamitouche, A.-E.; Bouhedda, M.; Amrane, A. Predicting the Concentration of Sulfate (So4²⁻) in Drinking Water Using Artificial Neural Networks: A Case Study: Médéa-Algeria. *Desalination Water Treat.* **2021**, *217*, 181–194. [CrossRef]

98. Singaravel, S.; Suykens, J.; Geyer, P. Deep-Learning Neural-Network Architectures and Methods: Using Component-Based Models in Building-Design Energy Prediction. *Adv. Eng. Inform.* **2018**, *38*, 81–90. [CrossRef]

99. Tahraoui, H.; Belhadj, A.-E.; Amrane, A.; Houssein, E.H. Predicting the Concentration of Sulfate Using Machine Learning Methods. *Earth Sci. Inform.* **2022**, *15*, 1023–1044. [CrossRef]

100. Tahraoui, H.; Belhadj, A.-E.; Hamitouche, A.-E. Prediction of the Bicarbonate Amount in Drinking Water in the Region of Médéa Using Artificial Neural Network Modelling. *Kem. Ind. Časopis Kemičara Kem. Inženjera* **2020**, *69*, 595–602. [CrossRef]

101. Tahraoui, H.; Amrane, A.; Belhadj, A.-E.; Zhang, J. Modeling the Organic Matter of Water Using the Decision Tree Coupled with Bootstrap Aggregated and Least-Squares Boosting. *Environ. Technol. Innov.* **2022**, *27*, 102419. [CrossRef]

102. Tahraoui, H.; Belhadj, A.-E.; Triki, Z.; Boudellal, N.R.; Seder, S.; Amrane, A.; Zhang, J.; Moula, N.; Tifoura, A.; Ferhat, R. Mixed Coagulant-Flocculant Optimization for Pharmaceutical Effluent Pretreatment Using Response Surface Methodology and Gaussian Process Regression. *Process Saf. Environ. Prot.* **2023**, *169*, 909–927. [CrossRef]

103. Kouadri, S.; Pande, C.B.; Panneerselvam, B.; Moharir, K.N.; Elbeltagi, A. Prediction of Irrigation Groundwater Quality Parameters Using ANN, LSTM, and MLR Models. *Environ. Sci. Pollut. Res.* **2022**, *29*, 21067–21091. [CrossRef]

104. Gebru, H.; Gebreyohannes, T.; Hagos, E. Evaluation of Groundwater Quality for Irrigation Purposes and Impact of Irrigation on Water in Golina River Basin, Northern Ethiopia. *Momona Ethiop. J. Sci.* **2024**, *16*, 144–166. [CrossRef]

105. ur Rehman, N.; Ali, W.; Muhammad, S.; Tepe, Y. Evaluation of Drinking and Irrigation Water Quality, and Potential Risks Indices in the Dera Ismail Khan District, Pakistan. *Kuwait J. Sci.* **2024**, *51*, 100150. [CrossRef]

106. Benouara, N.; Bouchehed, H.; Retima, N.; Bouguerra, H.; Tachi, S.; Remita, F. Evaluation of Groundwater Quality for Irrigation Purposes Using Water Quality Indices and GIS Technique: A Case Study of Seriana Plain Northeastern Algeria; Springer: Berlin/Heidelberg, Germany, 2024; Volume 515, pp. 477–489.

107. Somay-Altas, M. Hydrogeochemical Investigation of Irrigation Water in the Vicinity of Metallic Ore Deposits in Kiraz-İzmir, Turkey: Understanding the Crucial Nexus between “Geology and Food Safety”. *CLEAN–Soil Air Water* **2024**, *52*, 2300195. [CrossRef]

108. Adongo, T.A.; Abagale, F.K.; Kranjac-Berisavljevic, G. Soil Quality of Irrigable Lands of Irrigation Schemes in Northern Ghana. *Int. J. Innov. Sci. Eng. Technol.* **2015**, *2*, 314–326.

109. Ram, A.; Tiwari, S.; Pandey, H.; Chaurasia, A.K.; Singh, S.; Singh, Y. Groundwater Quality Assessment Using Water Quality Index (WQI) under GIS Framework. *Appl. Water Sci.* **2021**, *11*, 46. [CrossRef]

110. Xie, Z.; Zhang, Y.; Yan, Y.; Yuan, X.; Yu, X.; Luo, T. Spatial Variation of Surface Water Quality for Irrigation and Drinking Supply and Health Risks Assessment in Yarlongzangbo River Catchment, South Tibet. *South Tibet*. Available online: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4770439 (accessed on 10 October 2024).

111. Omar, M.M.; Massawe, B.H.; Shitindi, M.J.; Pedersen, O.; Meliyo, J.L.; Fue, K.G. Assessment of Salt-Affected Soil in Selected Rice Irrigation Schemes in Tanzania: Understanding Salt Types for Optimizing Management Approaches. *Front. Soil Sci.* **2024**, *4*, 1372838. [CrossRef]

112. Sengupta, N.; Ghosh, K. Assessment of Groundwater Suitability Using Water Quality Index and Health Risk Analysis in Upper Catchment Area of Kangsabati River, India. *Total Environ. Adv.* **2024**, *11*, 200114. [CrossRef]

113. Karmakar, D.; Sarkar, B.; Islam, N. Drinking Water Quality in Cooch Behar Municipality, West Bengal, India: Assessment Using WQI and Public Perception. *Environ. Qual. Manag.* **2024**, *34*, e22226. [CrossRef]

114. Benmarce, K.; Zighmi, K.; Hadji, R.; Hamed, Y.; Gentilucci, M.; Barbieri, M.; Pambianchi, G. Integration of GIS and Water-Quality Index for Preliminary Assessment of Groundwater Suitability for Human Consumption and Irrigation in Semi-Arid Region. *Hydrology* **2024**, *11*, 71. [CrossRef]

115. Asma, B.; Şener, Ş. Appraisal of Groundwater Suitability and Hydrochemical Characteristics by Using Various Water Quality Indices and Statistical Analyses in the Wadi Righ Area, Algeria. *Water Supply* **2024**, *24*, 1938–1957. [CrossRef]

116. 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.* **2020**, *19*, 439–451. [CrossRef]

117. Ahmed, A.A.; Sayed, S.; Abdoulhalik, A.; Moutari, S.; Oyedele, L. Applications of Machine Learning to Water Resources Management: A Review of Present Status and Future Opportunities. *J. Clean. Prod.* **2024**, *441*, 140715. [CrossRef]

118. Drogkoula, M.; Kokkinos, K.; Samaras, N. A Comprehensive Survey of Machine Learning Methodologies with Emphasis in Water Resources Management. *Appl. Sci.* **2023**, *13*, 12147. [CrossRef]
119. Chowdhry, J.; Kumari, S.; Nandal, M. Innovations in Nutrient Removal and Resource Recovery Through Artificial Intelligence Techniques: AI and Water: A Sustainable Approach to Environmental Restoration. In *The AI Cleanse: Transforming Wastewater Treatment Through Artificial Intelligence*; Garg, M.C., Ed.; Springer Water; Springer Nature: Cham, Switzerland, 2024; pp. 201–221, ISBN 978-3-031-67236-1.

120. Mohanty, A.; Mohanty, S.K.; Mohapatra, A.G. Real-Time Monitoring and Fault Detection in AI-Enhanced Wastewater Treatment Systems. In *The AI Cleanse: Transforming Wastewater Treatment Through Artificial Intelligence*; Garg, M.C., Ed.; Springer Water; Springer Nature: Cham, Switzerland, 2024; pp. 165–199, ISBN 978-3-031-67236-1.

121. Goyal, M.K.; Kumar, S.; Gupta, A. *AI Innovation for Water Policy and Sustainability*; SpringerBriefs in Water Science and Technology; Springer Nature: Cham, Switzerland, 2024; ISBN 978-3-031-72013-0.

122. Kumar, P.; Choudhury, D. Innovative Technologies for Effective Water Resources Management. In *Water Crises and Sustainable Management in the Global South*; Izah, S.C., Ogwu, M.C., Loukas, A., Hamidifar, H., Eds.; Springer Nature: Singapore, 2024; pp. 555–594, ISBN 978-981-9749-65-2.

123. Rane, N.; Choudhary, S.; Rane, J. Leading-Edge Artificial Intelligence (AI), Machine Learning (ML), Blockchain, and Internet of Things (IoT) Technologies for Enhanced Wastewater Treatment Systems. *Machine Learning (ML), Blockchain, and Internet of Things (IoT) Technologies for Enhanced Wastewater Treatment Systems* (October 31, 2023). 2023. Available online: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4641557 (accessed on 10 October 2024).

124. García, J.; Leiva-Araos, A.; Diaz-Saavedra, E.; Moraga, P.; Pinto, H.; Yepes, V. Relevance of Machine Learning Techniques in Water Infrastructure Integrity and Quality: A Review Powered by Natural Language Processing. *Appl. Sci.* **2023**, *13*, 12497. [CrossRef]

125. Wani, A.K.; Rahayu, F.; Ben Amor, I.; Quadir, M.; Murianingrum, M.; Parnidi, P.; Ayub, A.; Supriyadi, S.; Sakiroh, S.; Saefudin, S.; et al. Environmental Resilience through Artificial Intelligence: Innovations in Monitoring and Management. *Environ. Sci. Pollut. Res.* **2024**, *31*, 18379–18395. [CrossRef]

126. Doorn, N. Artificial Intelligence in the Water Domain: Opportunities for Responsible Use. *Sci. Total Environ.* **2021**, *755*, 142561. [CrossRef] [PubMed]

127. Nova, K. AI-Enabled Water Management Systems: An Analysis of System Components and Interdependencies for Water Conservation. *Eig. Rev. Sci. Technol.* **2023**, *7*, 105–124.

128. Bibri, S.E.; Krogstie, J. Environmentally Data-Driven Smart Sustainable Cities: Applied Innovative Solutions for Energy Efficiency, Pollution Reduction, and Urban Metabolism. *Energy Inf. 2020*, *3*, 29. [CrossRef]

129. Nikolaou, G.; Neocleous, D.; Christou, A.; Kitta, E.; Katsoulas, N. Implementing Sustainable Irrigation in Water-Scarce Regions under the Impact of Climate Change. *Agronomy* **2020**, *10*, 1120. [CrossRef]

130. Ssekyanzi, G.; Ahmad, M.J.; Choi, K.-S. Sustainable Solutions for Mitigating Water Scarcity in Developing Countries: A Comprehensive Review of Innovative Rainwater Storage Systems. *Water* **2024**, *16*, 2394. [CrossRef]

131. Fahmy, N.M.; Fayez, S.; Zengin, G.; Selvi, S.; Uba, A.I.; Mollica, A.; Bouyahya, A.; Ponniya, S.K.M.; Nilofar; Lekmine, S. Chemical Exploration of Different Extracts from Phytolacca Americana Leaves and Their Potential Utilization for Global Health Problems: In Silico and Network Pharmacology Validation. *J. Biomol. Struct. Dyn.* **2024**, 1–21. [CrossRef] [PubMed]

132. Lekmine, S.; Benslama, O.; Kadi, K.; Martín-García, A.I.; Ola, M.S.; Yilmaz, M.A.; Ali, A. Therapeutic Potential of Hyoscyamus Niger-Derived Compounds: Targeting Ovarian Cancer through Antioxidant Activity and EGFR Tyrosine Kinase Inhibition. *J. King Saud Univ.-Sci.* **2024**, *36*, 103103. [CrossRef]

133. Triki, Z.; Fergani, Z.; Lekmine, S.; Tahraoui, H.; Amrane, A.; Zamouche, M.; Kebir, M.; Assadi, A.A.; Khezami, L.; Zhang, J. Numerical Modelling and Performance Evaluation of Vacuum Membrane Distillation for Energy-Efficient Seawater Desalination: Towards Energy-Efficient Solutions. *Water* **2023**, *15*, 3612. [CrossRef]

134. Lekmine, S.; Benslama, O.; Tahraoui, H.; Ola, M.S.; Laouani, A.; Kadi, K.; Martín-García, A.I.; Ali, A. Anti-Cholinergic Effects of the Phenolic Extract from the Astragalus Crenatus Plant: A Computational and Network Pharmacology Study. *Pharmaceuticals* **2024**, *17*, 348. [CrossRef] [PubMed]

**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.