## 2 Related Work
### PSO Algorithm
#### 2.4.3 Mixed PSO Algorithm  
In the first stage of this study, in the process of generating a set of individual classifiers with moderate diversity, the characteristics of the dataset are selected as discrete values of {0, 1}. The resampling ratio of the sub-dataset is [0,1] continuous values; hence, this stage involves discrete and continuous mixed space optimization problems. Therefore, we designed a mixed PSO algorithm (MPSO), and the design search space was divided into a continuous domain and a binary domain, which correspond to the continuous and binary components of the design variable vector, respectively [56].  
The position code of a particle consists of two parts: continuous and binary, as shown in Figure 1, where \(f_{d}\in[0,1],d\ =\ 1,2,\ldots,D,r_{m}\in[0,1],m\ =\ 1,2,\ldots,M\).  
The MPSO solution process is divided into two steps: a continuous search step and a binary search step. The continuous search step uses the conventional PSO method, and the binary search step is implemented as the primary search strategy and uses a \"stickiness\" momentum mechanism in BPSO. The term \"stickiness\" was proposed by [PERSON] et al. [55; 57]. Since applying the speed concept of PSO directly to BPSO is not appropriate, the main idea of \"stickiness\" is that a particle moves by flipping its position entry in BPSO. When the bit has just flipped, it should keep its new value for a while and then decrease it in successive iterations.  
In the binary search step, a \(\textit{curLife}_{j}^{t}(j=1,2,\ldots,D)\) vector is used to record the number of iterations of the \(j\)th bit of the particle binary position since the bit has only recently been flipped. If the bit has just been flipped or initialized, then \(\textit{curLife}_{j}^{t}\) should be 1; after a number of iterations, if the bit does not flip, \(\textit{curLife}_{j}^{t}\) increases by 1. The stickiness of the \(j\)th bit can be calculated as follows:  
\[\textit{Stk}_{j}^{t}\ =\ \frac{\textit{curLife}_{j}^{t}}{\alpha*T_{max}} \tag{15}\]  
Figure 1: The particle position code in MPSO.  
\[\textbf{Stickness}_{i}^{t}(j)\ =\ \left\{\begin{array}{cl}1-\textbf{S}\textbf{t}k_{ j}^{t},&\text{if }\textbf{S}\textbf{t}k_{j}^{t}\leq 1\\ 0,&\text{otherwise}\end{array}\right. \tag{16}\]  
where \(\alpha\in(0,1)\) in Equation (15) is the scale factor of the number of iterations (in this study, \(\alpha\ =\ 0.2\)). If a bit is not flipped, as the number of iterations increases, the bit's stickiness property decreases.  
For each bit of the particle's binary position, the flipping probability is as given in Equation (17):  
\[\begin{array}{c}\textbf{Prob}_{i}^{t+1}(j)\ =\ \beta_{m}*\left(1-\textbf{S} \textbf{tickness}_{i}^{t}(j)\right)+\beta_{p}*\left|\textbf{{\emph{bbest}}^{t} (j)-x_{ij}^{t}\right|+\beta_{g}*\left|\textbf{{\emph{gbest}}^{t}(j)-x_{ij}^{t }\right|},\\ \beta_{m}+\beta_{p}+\beta_{g}\ =\ 1,j\ =\ 1,2,\ldots,D\end{array} \tag{17}\]  
where \(\beta_{m}\), \(\beta_{p}\) and \(\beta_{g}\) are the proportion factors, which represent the contribution of the momentum and the cognitive and social factors to the flipping probability, respectively. In this study, \(\beta_{m}\ =\ 0.25\), \(\beta_{p}\ =\ 0.25\), and \(\beta_{g}\ =\ 0.5\), which means that the global best particle's position is more important. Based on Equation (17), the new position of a particle can be calculated by Equation (18).  
\[\textbf{x}_{i}^{t+1}\ =\ \begin{cases}1-\textbf{x}_{i}^{t},&\text{if }rand()\leq \textbf{{\emph{Prob}}}_{i}^{t+1}\\ \textbf{x}_{i}^{t},&\text{otherwise}\end{cases} \tag{18}\]