Skip to Main Content
The MATLAB simulations are performed for feedforward neural networks using one input layer, one hidden layer, and an output layer. The number of hidden nodes was varied from 1 to 17 and found the best results at hidden nodes equal to 17. The input nodes were fixed to be 8, and the output node to 1. The optimal number of hidden nodes was found to be the maximum of 0 to (2n + 1) nodes given by the Kolmogorov mapping theorem (Hecht-Nielsen 1988). The Levenberg–Marquardt steepest gradient descent principle is used to learn weight updation. This algorithm gave better results than Bayesian Regularization, Scaled Conjugate Gradient, and many other algorithms in the MATLAB R2020 toolbox. The data of each WQP are divided into training, validation, and testing set consisting of 70, 15, and 15% sizes of datasets. The correlation coefficients (R values) of training, validation, testing, and overall for all of the parameters are given in Table 8. MATLAB environment gives the model performance in correlation coefficients (R) instead of regression coefficients (R2). The neural network predictions of EC are shown in Figure 4.
Table 8

The correlation coefficient (R) of output parameters using the Levenberg–Marquardt algorithm

S. No.ParameterTrainingValidationTestingOverallNetwork architecture
DO (mg/L) 0.76 0.72 0.78 0.75 8-17-1 
pH 0.67 0.54 0.51 0.62 8-17-1 
Electrical conductivity (mS/cm) 0.94 0.95 0.93 0.94 8-17-1 
BOD (mg/L) 0.82 0.89 0.83 0.83 8-17-1 
COD (mg/L) 0.93 0.94 0.90 0.92 8-17-1 
Nitrate 0.72 0.72 0.74 0.72 8-17-1 
Total Coliform (MPN/100 ml) 0.70 0.76 0.61 0.70 8-17-1 
Turbidity (NTU) 0.49 0.50 0.45 0.48 8-17-1 
Total Alk. (mg/L) 0.91 0.82 0.90 0.90 8-17-1 
10 Chloride (mg/L) 0.90 0.88 0.82 0.89 8-17-1 
11 Hardness (mg/L) 0.94 0.84 0.80 0.90 8-17-1 
12 Calcium (mg/L) 0.91 0.80 0.83 0.87 8-17-1 
13 Magnesium (mg/L) 0.80 0.77 0.80 0.80 8-17-1 
14 Sulphate (mg/L) 0.89 0.71 0.71 0.85 8-17-1 
15 Sodium (mg/L) 0.90 0.94 0.91 0.92 8-17-1 
16 TDS (mg/L) 0.92 0.95 0.96 0.92 8-17-1 
17 TSS (mg/L) 0.87 0.85 0.73 0.81 8-17-1 
18 Total Phosphate (mg/L) 0.84 0.70 0.63 0.75 8-17-1 
19 Potassium (mg/L) 0.77 0.60 0.63 0.71 8-17-1 
20 Fluoride (mg/L) 0.57 0.41 0.44 0.54 8-17-1 
21 Sodium % 0.74 0.65 0.66 0.71 8-17-1 
22 SAR 0.90 0.75 0.84 0.86 8-17-1 
S. No.ParameterTrainingValidationTestingOverallNetwork architecture
DO (mg/L) 0.76 0.72 0.78 0.75 8-17-1 
pH 0.67 0.54 0.51 0.62 8-17-1 
Electrical conductivity (mS/cm) 0.94 0.95 0.93 0.94 8-17-1 
BOD (mg/L) 0.82 0.89 0.83 0.83 8-17-1 
COD (mg/L) 0.93 0.94 0.90 0.92 8-17-1 
Nitrate 0.72 0.72 0.74 0.72 8-17-1 
Total Coliform (MPN/100 ml) 0.70 0.76 0.61 0.70 8-17-1 
Turbidity (NTU) 0.49 0.50 0.45 0.48 8-17-1 
Total Alk. (mg/L) 0.91 0.82 0.90 0.90 8-17-1 
10 Chloride (mg/L) 0.90 0.88 0.82 0.89 8-17-1 
11 Hardness (mg/L) 0.94 0.84 0.80 0.90 8-17-1 
12 Calcium (mg/L) 0.91 0.80 0.83 0.87 8-17-1 
13 Magnesium (mg/L) 0.80 0.77 0.80 0.80 8-17-1 
14 Sulphate (mg/L) 0.89 0.71 0.71 0.85 8-17-1 
15 Sodium (mg/L) 0.90 0.94 0.91 0.92 8-17-1 
16 TDS (mg/L) 0.92 0.95 0.96 0.92 8-17-1 
17 TSS (mg/L) 0.87 0.85 0.73 0.81 8-17-1 
18 Total Phosphate (mg/L) 0.84 0.70 0.63 0.75 8-17-1 
19 Potassium (mg/L) 0.77 0.60 0.63 0.71 8-17-1 
20 Fluoride (mg/L) 0.57 0.41 0.44 0.54 8-17-1 
21 Sodium % 0.74 0.65 0.66 0.71 8-17-1 
22 SAR 0.90 0.75 0.84 0.86 8-17-1 
Figure 4

ANN simulation of electrical conductivity.

Figure 4

ANN simulation of electrical conductivity.

Close modal
Close Modal

or Create an Account

Close Modal
Close Modal