## 2 Related Methods
### Binary Particle Swarm Optimization with Genetic Mechanism (GA-BPSO)  
Taking advantage of the heuristic algorithm, aiming at the maximum distance between classes [23; 24; 25], the wavelength's combination with the best inter-class separability in the spectral feature space of HSIs can be searched. In this paper, the BPSO with the introduction of a genetic mechanism is selected to obtain the spectral features of ground objects that are easy to be distinguished by the classifier. The standard PSO algorithm is used to solve the optimization problem in continuous space; however, in terms of discrete space, the discrete binary particle swarm optimization (BPSO) must be used. BPSO [26] was proposed by [PERSON] and [PERSON] in 1997 and is widely used in optimization combinatorial problems. This method computationally preserves the classical \"position-velocity\" update rule. It adopts binary coding and represents the value and change of particle state through 0-1 on each bit. Let the position of the particle \(i\) be \(x_{i}=(x_{i1},x_{i2},\ldots,x_{iD})\), \(i=1,2,\ldots,N\); the velocity be \(v_{i}=(v_{i1},v_{i2},\ldots,v_{iD})\), \(i=1,2,\ldots,N\); the optimal historical position of the individual is \(P_{i}=(p_{i1},p_{i2},\ldots,p_{iD})\), \(i=1,2,\ldots,N\); the overall historical optimal position is \(P_{g}=(p_{g1},p_{g2},\ldots,p_{gD})\), \(i=1,2,\ldots,N\). The formula for updating the velocity of particle \(i\) in the \(d\)\((d=1,2,\ldots,D)\) dimension is as shown in Equation (5):  
\[v_{id}^{k+1}=\omega v_{id}^{k}+c_{1}r_{1}(P_{id}^{k}-x_{id}^{k})+c_{2}r_{2}(P_ {gd}^{k}-x_{id}^{k}) \tag{5}\]  
where \(k\) is the number of iterations, \(i\) and \(d\) represent the particle \(i\) and its dimension, respectively, and \(\omega\) is the inertia weight, which represents the influence of the current speed of the particle on the speed of the next generation. \(c_{1}\) and \(c_{2}\) are learning factors, which represent the learning ability of particles to their own experience and group experience, and \(r_{1}\) and \(r_{2}\) are random numbers in the interval [0, 1]. In this paper, the convex function decrement method is used to adjust \(\omega\)[27, 28], and the strategy of decreasing the value of \(r_{1}\) and increasing the value of \(r_{2}\) is adopted [29, 30]. In this paper, a V-shaped [31] transfer function is used, and the function curve and expression are shown in Figure 1 and Equation (6), respectively, and Equation (7) is the particle position update formula. In these two equations, \(k\) represents the number of iterations, \(i\) and \(d\) represent the particle \(i\) and its dimension, respectively, and \(r_{3}\) is a random number in the interval [0, 1]. \(\left(x_{id}^{k}\right)^{-1}\) represents the complement of \(x_{id}^{k}\), i.e., from 0 to 1 or from 1 to 0. \[V(v_{id}^{k+1})=\frac{\left(v_{id}^{k+1}\right)^{2}}{1+\left(v_{id}^{k+1} \right)^{2}} \tag{6}\]  
\[x_{id}^{k+1}= \begin{cases}\left(x_{id}^{k}\right)^{-1}&r_{3}\leq V(v_{id}^{k +1})\\ x_{id}^{k}&\text{otherwise}\end{cases}  \tag{7}\]  
To further strengthen the BPSO search ability, it is usually advised to introduce the mutation and crossover mechanism in the genetic algorithm to improve the BPSO [32, 33, 34, 35]. In this paper, the particle swarm is crossed and mutated every \(Q1\) generation in the iterative process. At the same time, in order to ensure the convergence ability of the algorithm, the roulette algorithm is used to select the particle parent once every \(Q2\) generation according  
Figure 1: V-shaped transfer function. to the fitness value of the particle. Then, compare the particle fitness before and after the genetic operation, and if there is a degraded particle, make the particle return to the state before the operation. In order to maintain the diversity of the particle swarm and enhance the search effect in the later stage of the iteration [29], the crossover probability \(P_{c}\) can be gradually reduced, while the mutation probability \(P_{m}\) can be gradually increased with the iteration of the algorithm.