# Prediction of Arsenic Removal from Contaminated Water Using Artificial Neural Network Model
## 3 Results and Discussion
### Testing of the ANFIS Model  
Thirty percent (30%) of the data were used as the unseen data to test and validate the current ANFIS model. Its performance in the testing stage is illustrated in Figure 4 and Table 4. As shown in Figure 4, an excellent agreement between the predicted values and the targeted (experimental) values could be achieved. Similar to the training phase, high values of R% (97.72%) or R\({}^{2}\) (0.9333) and low values of MSE (0.137) or RMSE (0.274) were attained. This kind of agreement indicates the robustness of the developed ANFIS model in predicting the \(As\) removal from polluted water by the adsorption processes.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Parameter cluster & 4 \\ Partition matrix & 2 \\ Maximum number of iterations & 200 \\ Minimum improvement & \(1\times 10^{-5}\) \\ Maximum number of epochs & 80 \\ Error goat & 0 \\ Initial steps size & 0.01 \\ Step size decrease rate & 0.9 \\ Step size increase rate & 1.1 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Parameters of the developed ANFIS model.  
Figure 2: The topology of the ANFIS model.  
Even though ANFIS was used to model the adsorption of other heavy metals such as chromium and copper [25; 26; 27], it was not applied earlier to model _As_ adsorption. Its application to model _As_ adsorption is a novel contribution of the current study. A comparative performance of different MLAs is presented in Table 5. The MLAs used before to model _As_ adsorption were ANN, random forest (RF), and support vector regression (SVR) [15; 16; 17; 18; 19]. The primary challenge the researchers faced to use ANN was the small sizes of the datasets [15; 16; 17; 18]. They overcame the challenge by producing synthetic data using a specific algorithm for interpolation. However, they did not use any means to validate the utility of this kind of artificial data. On the other hand, [PERSON] et al. [21] tested two non-ANN models, RF and SVR, for modeling _As_ adsorption. Even though these MLAs could predict the trends quite well (R\({}^{2}\) > 0.93), the errors or data dispersions were significantly high (RMSE > 2.5). In comparison, the current ANFIS model not only could predict the trends of the data more accurately (R\({}^{2}\) > 0.93) but also yielded significantly less error (RMSE < 0.48). It should be noted that [PERSON] et al. [21] used the same datasets as those used for the current study.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & **MSE** & **RMSE** & **R (\%)** & **R\({}^{2}\)** \\ \hline
1 & \(1.7447\times 10^{-8}\) & \(1.320\times 10^{-4}\) & 100 & 1 \\
2 & \(8.84436\times 10^{-8}\) & \(1\times 10^{-4}\) & 100 & 0.9997 \\
3 & \(4.0718\times 10^{-10}\) & \(2.0179\times 10^{-5}\) & 100 & 0.9996 \\
4 & \(1.6415\times 10^{-8}\) & \(1.28\times 10^{-3}\) & 100 & 0.9995 \\
5 & \(3.2906\times 10^{-5}\) & \(5.76\times 10^{-3}\) & 99.99 & 0.9998 \\
6 & \(3.3013\times 10^{-8}\) & \(1.8\times 10^{-4}\) & 100 & 0.9998 \\
7 & \(4.5042\times 10^{-8}\) & \(2.123\times 10^{-3}\) & 99.99 & 0.9999 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Performance of the ANFIS model in the training stage.  
Figure 3: Performance of the ANFIS model in the training phase: (**a**) dataset 1, (**b**) dataset 2, (**c**) dataset 3, (**d**) dataset 4, (**e**) dataset 5, (**f**) dataset 6, and (**g**) dataset 7.