1 Introduction

In reproduction of input data and correlation of properties, neural networks (NNs) are reliable tools as described in the literatures for various applications [17]. NNs learn the patterns among input and output data using various mathematical and statically functions. The versatility of NNs for modeling of nonlinear systems has been extensively analyzed and examined in the literature. The topology adjustment from an initially generated structure toward the final optimal one has been of interest for NNs applications. The optimization techniques can be used for modifying the NNs toward a feasible topology as investigated in a recent work [8].

In a recent work [8], some of the authors have investigated and analyzed the air gap membrane distillation (AGMD) system employing a mathematical technique which uses Volterra functional series theory. The cold feed inlet temperature (T 1), hot feed inlet temperature (T 3) and feed-in flow rate (F) were considered as the input variables of the AGMD system, and distillate flux (J), cold feed outlet temperature (T 2) and gained output ratio (GOR) were set as the output variables. To explore the effect of input operational parameters, they used particle swarm optimization technique to control neural network and the obtained weights. In other words, they showed that weight values of each variable in each layer of constructed NN can be related to the coefficients in Volterra functional series \(\left( {\sum\nolimits_{i = 1}^{N} {a_{i} x_{i} } } \right)\), so that the order of contribution of each input variable in the developed model equation might be evaluated.

Here, we extend the idea by monitoring and analysis the biases and the NNs operators using a coupled genetic algorithm (GA) and particle swarm optimization (PSO). The monitoring of biases and weights is separated from that of operators such as addition and multiplication so that more reliably the NN topology can be assessed. The details of proposed approach and the case to which it is applied are discussed in following paragraphs.

2 Proposed method

The main interest, for presentation of coupled genetic algorithm (GA) and particle swarm optimization (PSO) which is incorporated into neural networks (NNs), shortly c-GA–PSO-NN, is in searching optimal NN topology. The GA was practically used for controlling and monitoring of connections and topology of initial constructed NN. During the coding and decoding steps in GA [9], the mathematical operators such as addition and multiplication (as applied to biases and weights in NNs) can be coded and being controlled. So, GA would be able to supervise and guide the evolution of NN topology. On the other hand, the PSO is a coding/decoding step-free optimization technique which is fast and reliable [8, 9]. The PSO checks the values of all individual biases and weights in NN to examine the significant of each input parameter and the complexity of interrelations between inputs and layers. Based on these checks, the results from PSO are sent to GA to change or reconsider the applied operators or namely the connections between layers.

To develop c-GA–PSO-NN, here, implementation of feed forward neural networks was considered. For an initially constructed NN as illustrated in Fig. 1, the supervision of initially constructed NN, as qualitatively discussed above, is illustrated in Fig. 2. To assess the goodness of each topology in GA part and estimated biases and weights in PSO part, a number of statistical parameters were used as utilized in previous work [8]. For application of c-GA–PSO-NN for modeling/analyzing any system of interest, first a feed forward NN should be initiated and the values of biases and weights must be linked to PSO code. The operators of NN are controlled by GA in parallel. Through the workflow illustrated in Fig. 2, the final topology of NN could be searched.

Fig. 1
figure 1

Illustrating an initially constructed neural network

Fig. 2
figure 2

Workflow of c-GA–PSO-NN technique

Four parameters [sum of squares due to error of the fit (SSE), square of the correlation (R 2), adjusted R 2 (R 2-adj) and standard error of the regression (RMSE)] have been defined for evaluation of goodness of each iteration/generation solutions (objective functions) as listed in Table 1.

Table 1 Statistical parameters defined for assessment of performance (objective functions)

In Ref. [8], the relationships between input variables [cold feed inlet temperature (T 1), hot feed inlet temperature (T 3) and feed-in flow rate (F)] and outputs parameters [distillate flux (J), cold feed outlet temperature (T 2) and gained output ratio (GOR)] and variables were considered using the particle swarm optimization for controlling neural network. The data for system of interest were collected from the literature [10]. To apply the new c-GA–PSO-NN method, Table 2 summarizes the characteristics of GA and PSO.

Table 2 GA and PSO parameters

3 Evaluation of proposed method

The c-GA–PSO-NN method was applied for a previously case reported in Ref. [8]. This analysis should reveal the applicability of proposed method in a concise manner. In Ref. [8], the PSO was coupled to NNs to investigate effective input variables by monitoring the weights and biases in NNs. Consequently, applying the proposed c-GA–PSO-NN to this case will result in valuable conclusions regarding these approaches. The GA and PSO codes were obtained from Ref. [9], and the objective functions were the same as used in Ref. [8] so that a defensible comparison can be made. The obtained goodness of final solutions is listed in Table 3.

Table 3 Statistical parameters as measure of goodness of model

Based on the results listed in Table 3, the R 2 values of final models using the proposed method are much more feasible than those obtained in Ref. [8]. Small values of RMSE and SSE obviously approve the goodness of final model coefficients and the models agreement to the collected data. The optimal NN topologies were obtained only after seven iterations which is fast and noting to the goodness parameters, is highly reliable.

4 Conclusion

Supervised neural networks incorporating a coupled genetic algorithm and particle swarm optimization techniques were presented. In the proposed method, genetic algorithm mainly monitors the applied operators and connections of layers in constructed neural network, while particle swarm optimization checks the values of biases and weights of layers to modify the network topology toward final optimal network construction. The initially constructed neural network converged to optimal topology fast and efficiently only in seven iterations. The c-GA–PSO-NN method used here can be used for other applications noting the outstanding results.