## 2 Methodologies
### Whale Optimization Deep Belief Network (WO-DBN)  
For a complex structure of a DBN which is composed of multiple-layer RBMs, there are many hyperparameters in the DBN that should be determined beforehand. Generally, those hyperparameters are determined by the control variable method. However, using the control variable method, there are three main shortcomings [31], which are as follows: (1) For many search parameters, it is hard work to implement a control variable method. (2) For a small search range, the searched optimal value is only the result in this small range, rather than the real optimal one. (3) The theoretical basis of the control variable method is lacking. To solve those shortcomings, it is a very suitable way to use the optimization method to select the suitable hyperparameters of a DBN. As one good global optimization method, the WOA can be used to select the optimal hyperparameters of the machine learning model [33]. Therefore, in this study, the WOA is used to determine the suitable hyperparameters of the DBN, and a new deep learning model called a whale optimization deep belief network (WO-DBN) is proposed, whose flow chart is shown in Figure 6.  
It must be noted that, in this deep learning model, based on the experience and our tests, there are four hidden layers. The ReLU activation function, which only requires a threshold to obtain the activation value and has a very fast convergence speed, is used [34].  
The main steps of the new deep learning model are as follows:  
(1) Based on the experience, the searched ranges of the DBN hyperparameters that should be determined are provided. The hyperparameters include the neuron numbers for the first, second, third and fourth hidden layers (\(n_{1}\), \(n_{2}\), \(n_{3}\) and \(n_{4}\)), the learning rate \(\eta\) and the maximum iteration numbers for pre-training and fine-tuning (\(T_{1}\) and \(T_{2}\)), which are taken as the whale position \(\overrightarrow{Z}\), represented as,  
\[\overrightarrow{Z}=[n_{1},n_{2},n_{3},n_{4},\eta,T_{1},T_{2}], \tag{15}\]  
(2) Based on the experiments and our tests, the initial parameters of the WOA are given, including the maximum iteration number \(T_{max}\), the whale population size \(N\) and the spiral size constant \(b\). According to the number of optimized hyperparameters, the dimension \(D\) is determined to be 7. Moreover, the initial whale population is generated randomly.  
(3) According to the solved problem, the fitness function is defined as  
\[f=\frac{\sum\limits_{i=1}^{M}\left(y_{i}-y_{i}^{\prime}\right)^{2}}{M}, \tag{16}\]  
where \(y_{i}^{\prime}\) and \(y_{i}\) are the computed and real values of the \(i\)th sample, respectively, and \(M\) is the number of samples.  
By using this fitness function, the fitness values of whale individuals can be obtained. According to its fitness value, the most adaptive individual is taken as the prey, whose position is selected as the target position.  
(4) Based on the computing operations in the fourth step of the WOA, the positions of whale individuals have been updated, and the new whale population is generated.  
(5) If the iteration number reaches the maximum iteration number \(T_{max}\), the process is over. Otherwise, the process returns to step (3).  
(6) The whale individual with the best position is selected and outputted, whose position is the optimized DBN hyperparameters. And by using those hyperparameters, the suitable DBN model can be obtained.