# Detection and Prediction of HMS from Drinking Water by Analysing the Adsorbents from Residuals Using Deep Learning

Authors: Sanjay Kumar Suman; N. Arivazhagan; L. Bhagyalakshmi; Himanshu Shekhar; P. Shanmuga Priya; T. Helan Vidhya; Sushma S. Jagtap; Gouse Baig Mohammad; Shubhangi Digamber Chikte; S. Chandragandhi; Alazar Yeshitla
Journal: Adsorption Science & Technology
 (2022)

---

## Abstract

Contamination HM is an important issue associated with the environment, and it requires suitable steps for the reduction of HMs in water at an acceptable ratio. With modern technologies, this could be possible by enabling the carbon adsorbents to adsorb the pollutions via deep learning strategies. In this paper, we develop a model on detection and prediction of presence of HMs from drinking water by analysing the adsorbents from residuals using deep learning. The study uses dense neural networks or DenseNets to analyse the microscopic images of the residual adsorbents. The study initially preprocesses and extracts features using standardised procedure. The DenseNets are used finally for detection purpose, and it is trained and tested with standard set of microscopic images. The experimental results are conducted to test the efficacy of the deep learning model on detecting the HM composition. The results of simulation show that the proposed deep learning model achieves 95% higher rate of detecting the HM composition from the adsorption residuals than other methods.


---

## Body

## 1. Introduction

Humans and animals both need access to clean water. To live a long and healthy life, it is essential to have access to safe drinking water [1]. The problem is that while the global need for water continues to rise each year, pollution from numerous sources has damaged potential water sources [2]. The climate change effects including temperature increasing and water cycle changes exacerbate the flooding, droughts, and contamination of chemicals in water [3].For example, if a polluted water supply is used for irrigation, people may be exposed to diseases or poisonous chemicals from the water, or they may eat aquatic species that have been poisoned by the toxins. However, for the vast majority of people in the world poorest countries, polluted water is the greatest threat to their health [4].People in underdeveloped nations are particularly vulnerable to the negative effects of rising pollution because they it lacksthe water resources to be treated efficiently or it is considered as its ability on accessing the water systemsto be safer one [5]. People mostly lacks fundamental sanitations, including drinking water, and people tends to spend more on getting water from various sources, including boreholes, piped water, springs, protected wells, packaged water, or rainfall, according to the World Health Organization [6].Water-related diseases are more likely to occur in impoverished countries if people are unable to consistently obtain an improved drinking water supply. According to the WHO, more than millions die from water borne diseases that include dengue and diarrhoea [7]. The greatest hazard to human health in developing countries is the pollution of drinking water by microbiological pathogens. There is also a rising concern about the increasing of Heavy Metals (HMs) in the drinking water supply [8].HM contamination has increased as a result of an increase in industrial and urban activity in developing countries in recent years. Many businesses, including coal-fired power stations and mines, release contaminated wastewater, which is combined with solid waste disposal and waste recycling to create a significant amount of pollution, which is further exacerbated by vehicle emissions and other urban activities [9].More than 80% of municipal and industrial waste is discharged into natural ecosystem without proper treatments. The urban polluted storm water, rainwater transfer, and agricultural runoff transformation into a drinking source is considered as an additional contamination [10].In light of their well-documented negative impacts on human health, carcinogenicity, and toxicity, HMs are a major source of worry. HM contamination problem occurs as a result of the ineffectiveness of common water treatment methods in developing countries [11].The presence of HMs in water and the health risks associated with HM contamination have been the subject of numerous review studies when examining their influence on the developing world [12].A deep learning model is used to analyse adsorbents from residuals to detect and predict the presence of HMs in drinking water. The remaining adsorbed materials are studied using dense neural networks (DenseNets), in this study. After training and testing on a standard collection of microscopic images with the DenseNets, they are used for final detection.


## 2. Background

The toxicity of HM in water in emerging countries, such as China, India, Bangladesh, Ethiopia, Pakistan, and other developing countries, has been extensively studied by many scholars [13–19]. To make matters worse, because of the well-documented harm that HMs inflict on human health, a great deal of study has been done on ways to remove HMs from water, such as waste water from municipalities or industry.Activated carbon adsorption, carbon nanotechnology, and a variety of modified adsorbents are among the treatment methods and technologies that have recently received attention for their HMs removal, and they are investigated as a major sources of research in major developed countries. However, in the context of the developing world, these technologies are not viable or cost-effective. Water treatment systems in most countries tends to be done using purchase, locally built, and cost as little as possible to run [15].The lack of conventional water treatment procedures for removing HMs is another problem for developing countries. Adsorbents with low cost have been extensively studied to check if the HMs are removed from water [16].According to research, HMs can be effectively removed from these materials. It appears that agricultural waste and by-products, rather than mineral deposits and natural soil, are the most successful at removing HMs from soil samples in this study. In spite of the fact that chemically modifying the adsorbents boosted the total adsorption capabilities of the materials studied, these technologies are often unavailable to communities [17].Material properties and quality of water both have an important role in how well these materials remove HMs. The stability and speciation of HMs, as well as the adsorptive properties of the adsorbent, might be affected by these conditions. In addition, ion exchange and the effect of electrostatic forces are the most commonly stated mechanisms for the removal of HMs. When it comes to the efficiency of these systems, water quality plays a huge role [18, 19].The major contributions of the work involve the following:(i)
The HPI (Heavy Metal Potential Index) protocols were six quality procedures for groundwater contamination developed using the analysed results of the HM concentrations; these included the HEI, CI, EHC, and HMI, respectively(ii)
Three groundwater samples had BDL As and Mn concentrations are eliminated from the calculation of several indices(iii)
The experimental results are conducted to test the efficacy of the deep learning model on detecting the HM composition. The results of simulation show that the proposed deep learning model achieves higher rate of detecting the HM composition from the adsorption residuals than other methods


## 3. Proposed Method

In the study region, samples were taken from 300 different locations by hand pumping and digging wells. Polyethylene containers were used to collect and filter groundwater samples. In order to prevent metal precipitation and biological growth, the pH from samples is maintained carefully with proper acidification. The atomic absorption spectrophotometer was used to aspirate water samples at appropriate wavelengths, which were then analysed. As a reductant, potassium iodide and sodium borohydride solution are utilised in the atomic absorption spectrophotometer to evaluate groundwater samples. The proposed method is shown in Figure1.Figure 1
Classes of quality procedures in evaluation.For each metal analysis, we used the averages of three independent sets of data. Calibration of the instrument with standards and blanks was performed after every 10 samples to achieve an error of less than 3% in the analytical precession. The latitude/longitude of sampling station using a GPS is recorded during sample collection.The HPI protocols were the six quality procedures for groundwater contamination developed using the analysed results of the HM concentrations; these included the HEI, CI, EHC, and HMI, respectively. Three groundwater samples had BDL, and As and Mn concentrations are eliminated from the calculation of several indices.


### 3.1. HPI

Individual HM impacts on the overall water quality state are assessed by HPI. With this method, it is calculated by assigning an appropriate rating to the human factors selected, which are carried out based on quality or by taking into account the maximum acceptable and maximum desired limits for each HM.


### 3.2. HEI

Heavily contaminated water (HMs) can be assessed using HEI, which is identical to HPI. For the purposes of this approach, the maximum allowable concentration of any given HMI was divided by the measured HMI concentration. Because HEI does not have a critical value, workers must use their own discretion when evaluating pollution levels using this metric. It was so determined that a multiple of mean approach was used to classify the groundwater in the study area into three pollution categories.


### 3.3. CI

It sums together the combined effects of many quality characteristics that are regarded as detrimental to domestic water in order to provide the degree of contamination. Contamination factors from individual HMs that exceeded the maximum permitted value were used to calculate the current CI values.


### 3.4. EHCI

Based on information entropy, the EHCI measures water quality. The EHCI drinking water consideration is calculated by first computing the Shannon entropy information weights (wi) for HMs and then using the weights and subindices (Qi) to get the EHCI drinking water weights (qi). The critical value of qi is 200.


### 3.5. HMI

An area water quality can be represented using the HMIi.e.principal component analysis (PCA). Using PCA, factor loadings are calculated by taking into account factors with Eigenvalues greater than 1. To calculate HMI, PCA-based relative eigenvalues and factor loadings are multiplied, and the result is the matching HM weight (pi).


### 3.6. PMI

There are no boundaries to the number of variables that can be used in PMI multivariate metal indexing approach. The NSPMI for all derived factors, including those with both positive and negative values, is added. As a result, a standardised PMI score is computed to simplify the interpretation of the data.


### 3.7. Classification of Dense Networks

#### 3.7.1. DenseNet Classification

As such, DenseNet can be seen as an extension of this. Let take a short trip to mathematics to figure out how we got here. Taylor expansion of functions is a useful reminder.x=0x=0x=0 is the point at which x equals 0x equals 0. There are many ways to express this.
(1)fx=f0+f′0x+f″02!x2+f‴03!x3+⋯...The decomposition of a function into higher and higher-order terms is critical. ResNet, on the other hand, decomposes functions into subfunctions.(2)fx=x+gx.ResNet breaks down thefx into a basic linear component and a more sophisticated nonlinear term. DenseNet was one of the options. Mapped values are obtained by progressively more sophisticated functions being applied to an increasing number of variables.
(3)x⟶x,f1x,f2x,f1x,f3x,f1x,f2x,f1x,⋯.There are three ways to look at something. As a result, the number of features in MLP is reduced again. In terms of implementation, the study simply concatenates terms rather than adds them. DenseNet gets its name from how dense the graph of interdependencies between variables grows. In a chain like this, the final layer is tightly linked to every layer before it. Dense blocks and transition layers are the primary constituents of a DenseNet. These are the two components that regulate the number of channels and the concatenation of the inputs and outputs.


#### 3.7.2. Dense Blocks

Using the batch normalisation, activation, and convolution structure of ResNet, DenseNet is able to perform better than ResNet. Each convolution block in a dense block uses the same number of output channels, forming a single convolutional block. The input and output of each convolution block are concatenated on the channel dimension in the study forward propagation, however.


#### 3.7.3. Transition Layers

Adding too many dense blocks will result in a model with an excessive number of channels. The model complexity is managed by the use of a transition layer. Convolutional layer1×11×11×1 and average pooling layer stride 2 lower the number of channels and the width or height of the pooling layer. The output of the dense block in the preceding example can benefit from the addition of a transition layer with ten channels. There are now only 10 output channels, and the overall size is smaller as well.


#### 3.7.4. DenseNet Model

After that, a DenseNet model will be built. A convolutional and pooling layer are used in DenseNet first stages, just like in ResNet. DenseNet then employs four dense blocks in a manner similar to ResNet four residual block modules. A dense block convolutional layer count can be customised, similar to ResNet. In addition, the study sets the dense block convolutional layer channel count at 32, resulting in an additional 128 channels for each dense block. The stride of 2 reduces the height and width of each module in ResNet by a residual block.


#### 3.7.5. Training

Because of this, the input height and breadth will be reduced from224×96 to facilitate computation because the study is employing a deeper network.


### 3.8. Fitness Function

A DenseNet model was developed that uses a dataset subset for training and testing. Nine input variables (HMs) and the resulting indices of subset are normalised using the (0–1) scale in order to avoid the inverse effect of the changing scale of the input variables. The constant datasets convergence is achieved through data normalisation. The following equation was used to normalise the data before it was preprocessed for analysis:(4)r=r−rmin/rmax−rmin,where,r∗: input data (of normalised one),rmin: minimum input value,rmax: maximum input value.The training dataset allocation is another crucial component of this study. A total of 226 datasets were used, of which 184 datasets were used to train the model. Additional groundwater samples with As and Mn concentrations below detection limits were detected and removed from the training sets.In addition, applying L2 regularisation to the DL algorithm minimises the model complexity by computing the sum of weighted parameters and it is given as follows:(5)L0=1n∑i=1nO−P2,where,L0: loss function,n: training datasets,O: observed output,P: predicted output.


## 3.1. HPI

Individual HM impacts on the overall water quality state are assessed by HPI. With this method, it is calculated by assigning an appropriate rating to the human factors selected, which are carried out based on quality or by taking into account the maximum acceptable and maximum desired limits for each HM.


## 3.2. HEI

Heavily contaminated water (HMs) can be assessed using HEI, which is identical to HPI. For the purposes of this approach, the maximum allowable concentration of any given HMI was divided by the measured HMI concentration. Because HEI does not have a critical value, workers must use their own discretion when evaluating pollution levels using this metric. It was so determined that a multiple of mean approach was used to classify the groundwater in the study area into three pollution categories.


## 3.3. CI

It sums together the combined effects of many quality characteristics that are regarded as detrimental to domestic water in order to provide the degree of contamination. Contamination factors from individual HMs that exceeded the maximum permitted value were used to calculate the current CI values.


## 3.4. EHCI

Based on information entropy, the EHCI measures water quality. The EHCI drinking water consideration is calculated by first computing the Shannon entropy information weights (wi) for HMs and then using the weights and subindices (Qi) to get the EHCI drinking water weights (qi). The critical value of qi is 200.


## 3.5. HMI

An area water quality can be represented using the HMIi.e.principal component analysis (PCA). Using PCA, factor loadings are calculated by taking into account factors with Eigenvalues greater than 1. To calculate HMI, PCA-based relative eigenvalues and factor loadings are multiplied, and the result is the matching HM weight (pi).


## 3.6. PMI

There are no boundaries to the number of variables that can be used in PMI multivariate metal indexing approach. The NSPMI for all derived factors, including those with both positive and negative values, is added. As a result, a standardised PMI score is computed to simplify the interpretation of the data.


## 3.7. Classification of Dense Networks

### 3.7.1. DenseNet Classification

As such, DenseNet can be seen as an extension of this. Let take a short trip to mathematics to figure out how we got here. Taylor expansion of functions is a useful reminder.x=0x=0x=0 is the point at which x equals 0x equals 0. There are many ways to express this.
(1)fx=f0+f′0x+f″02!x2+f‴03!x3+⋯...The decomposition of a function into higher and higher-order terms is critical. ResNet, on the other hand, decomposes functions into subfunctions.(2)fx=x+gx.ResNet breaks down thefx into a basic linear component and a more sophisticated nonlinear term. DenseNet was one of the options. Mapped values are obtained by progressively more sophisticated functions being applied to an increasing number of variables.
(3)x⟶x,f1x,f2x,f1x,f3x,f1x,f2x,f1x,⋯.There are three ways to look at something. As a result, the number of features in MLP is reduced again. In terms of implementation, the study simply concatenates terms rather than adds them. DenseNet gets its name from how dense the graph of interdependencies between variables grows. In a chain like this, the final layer is tightly linked to every layer before it. Dense blocks and transition layers are the primary constituents of a DenseNet. These are the two components that regulate the number of channels and the concatenation of the inputs and outputs.


### 3.7.2. Dense Blocks

Using the batch normalisation, activation, and convolution structure of ResNet, DenseNet is able to perform better than ResNet. Each convolution block in a dense block uses the same number of output channels, forming a single convolutional block. The input and output of each convolution block are concatenated on the channel dimension in the study forward propagation, however.


### 3.7.3. Transition Layers

Adding too many dense blocks will result in a model with an excessive number of channels. The model complexity is managed by the use of a transition layer. Convolutional layer1×11×11×1 and average pooling layer stride 2 lower the number of channels and the width or height of the pooling layer. The output of the dense block in the preceding example can benefit from the addition of a transition layer with ten channels. There are now only 10 output channels, and the overall size is smaller as well.


### 3.7.4. DenseNet Model

After that, a DenseNet model will be built. A convolutional and pooling layer are used in DenseNet first stages, just like in ResNet. DenseNet then employs four dense blocks in a manner similar to ResNet four residual block modules. A dense block convolutional layer count can be customised, similar to ResNet. In addition, the study sets the dense block convolutional layer channel count at 32, resulting in an additional 128 channels for each dense block. The stride of 2 reduces the height and width of each module in ResNet by a residual block.


### 3.7.5. Training

Because of this, the input height and breadth will be reduced from224×96 to facilitate computation because the study is employing a deeper network.


## 3.7.1. DenseNet Classification

As such, DenseNet can be seen as an extension of this. Let take a short trip to mathematics to figure out how we got here. Taylor expansion of functions is a useful reminder.x=0x=0x=0 is the point at which x equals 0x equals 0. There are many ways to express this.
(1)fx=f0+f′0x+f″02!x2+f‴03!x3+⋯...The decomposition of a function into higher and higher-order terms is critical. ResNet, on the other hand, decomposes functions into subfunctions.(2)fx=x+gx.ResNet breaks down thefx into a basic linear component and a more sophisticated nonlinear term. DenseNet was one of the options. Mapped values are obtained by progressively more sophisticated functions being applied to an increasing number of variables.
(3)x⟶x,f1x,f2x,f1x,f3x,f1x,f2x,f1x,⋯.There are three ways to look at something. As a result, the number of features in MLP is reduced again. In terms of implementation, the study simply concatenates terms rather than adds them. DenseNet gets its name from how dense the graph of interdependencies between variables grows. In a chain like this, the final layer is tightly linked to every layer before it. Dense blocks and transition layers are the primary constituents of a DenseNet. These are the two components that regulate the number of channels and the concatenation of the inputs and outputs.


## 3.7.2. Dense Blocks

Using the batch normalisation, activation, and convolution structure of ResNet, DenseNet is able to perform better than ResNet. Each convolution block in a dense block uses the same number of output channels, forming a single convolutional block. The input and output of each convolution block are concatenated on the channel dimension in the study forward propagation, however.


## 3.7.3. Transition Layers

Adding too many dense blocks will result in a model with an excessive number of channels. The model complexity is managed by the use of a transition layer. Convolutional layer1×11×11×1 and average pooling layer stride 2 lower the number of channels and the width or height of the pooling layer. The output of the dense block in the preceding example can benefit from the addition of a transition layer with ten channels. There are now only 10 output channels, and the overall size is smaller as well.


## 3.7.4. DenseNet Model

After that, a DenseNet model will be built. A convolutional and pooling layer are used in DenseNet first stages, just like in ResNet. DenseNet then employs four dense blocks in a manner similar to ResNet four residual block modules. A dense block convolutional layer count can be customised, similar to ResNet. In addition, the study sets the dense block convolutional layer channel count at 32, resulting in an additional 128 channels for each dense block. The stride of 2 reduces the height and width of each module in ResNet by a residual block.


## 3.7.5. Training

Because of this, the input height and breadth will be reduced from224×96 to facilitate computation because the study is employing a deeper network.


## 3.8. Fitness Function

A DenseNet model was developed that uses a dataset subset for training and testing. Nine input variables (HMs) and the resulting indices of subset are normalised using the (0–1) scale in order to avoid the inverse effect of the changing scale of the input variables. The constant datasets convergence is achieved through data normalisation. The following equation was used to normalise the data before it was preprocessed for analysis:(4)r=r−rmin/rmax−rmin,where,r∗: input data (of normalised one),rmin: minimum input value,rmax: maximum input value.The training dataset allocation is another crucial component of this study. A total of 226 datasets were used, of which 184 datasets were used to train the model. Additional groundwater samples with As and Mn concentrations below detection limits were detected and removed from the training sets.In addition, applying L2 regularisation to the DL algorithm minimises the model complexity by computing the sum of weighted parameters and it is given as follows:(5)L0=1n∑i=1nO−P2,where,L0: loss function,n: training datasets,O: observed output,P: predicted output.


## 4. Results and Discussions

Different indices were used to evaluate groundwater HM pollution, as well as the performance and the accuracy of computed indices. Groundwater HM contamination indices for a groundwater are analysed in this section to determine the model correctness.The evolution of different indices is assessed by the validation metrics that includes accuracy, precision, recall, F-measure, and error.Figure2 shows the accuracy of validating the prediction of how well the pollution indices find the pollution level in ground water. The results are assessed in terms of HEI, HPI, EHCI, CI, PMI, and HMI. The results of the simulation show that DenseNets achieves higher rate of accuracy using these quality protocols than other AI models.Figure 2
Accuracy.Figure3 shows the precision of validating the prediction of how well the pollution indices find the pollution level in ground water. The results are assessed in terms of HEI, HPI, EHCI, CI, PMI, and HMI. The results of the simulation show that DenseNets achieves higher rate of precision using these quality protocols than other AI models.Figure 3
Precision.Figure4 shows the recall of validating the prediction of how well the pollution indices finds the pollution level in ground water. The results are assessed in terms of HEI, HPI, EHCI, CI, PMI, and HMI. The results of the simulation show that DenseNets achieves higher rate of recall using these quality protocols than other AI models.Figure 4
Recall.Figure5 shows the F-measure of validating the prediction of how well the pollution indices find the pollution level in ground water. The results are assessed in terms of HEI, HPI, EHCI, CI, PMI, and HMI. The results of the simulation show that DenseNets achieves higher rate of F-measure using these quality protocols than other AI models.Figure 5
F-measure.Figure6 shows the percentage error of validating the prediction of how well the pollution indices find the pollution level in ground water. The results are assessed in terms of HEI, HPI, EHCI, CI, PMI, and HMI. The results of the simulation show that DenseNets achieves reduced error rate using these quality protocols than other AI models.Figure 6
Percentage error.


## 5. Conclusions

In this paper, prediction of presence of HMs using various quality protocols on the drinking water is analysed using the adsorbents from residuals using DenseNet. DenseNet analyzes the microscopic images of the residual adsorbents. The study initially preprocesses and extracts features using standardised procedure. The DenseNets are used finally for detection purpose, and it is trained and tested with standard set of microscopic images.The experimental results are conducted to test the efficacy of the deep learning model on detecting the HM composition. The results of simulation show that the proposed deep learning model achieves higher rate of detecting the HM composition from the adsorption residuals than other methods. In the future, the proposed modelling can improvised with the several utilization of machine learning or deep learning methods.



---

*Source: 3265366-2022-03-24.xml*