## 3 Background
### Improved Dragonfly Algorithm (IDA)  
IDA enhances the original Dragonfly Algorithm (DA) by introducing advanced updating mechanisms for the algorithm's coefficients. In the DA, the coefficients are updated using random functions, which can lead to suboptimal convergence and exploration-exploitation balance. IDA addresses this limitation by employing structured updating mechanisms, including linear, quadratic, and sinusoidal functions, to refine the coefficients. This improvement allows IDA to achieve a better balance between exploration and exploitation, which is crucial to effectively navigate the high-dimensional feature space encountered in FS tasks [26].  
Inspired by dragonflies' swarming behaviors, IDA models two key behaviors: hunting and migration, governed by principles such as separation (S), alignment (A), cohesion (C), attraction (F), and distraction (E). These behaviors guide the search for optimal solutions. To adapt continuous updates for binary FS tasks, IDA employs a V-shaped transfer function, which effectively transforms continuous position updates into binary solutions. Position updates are calculated iteratively using Equations (2) and (3).  
\[\Delta X_{t+1}=(sS_{i}+aA_{i}+cC_{i}+fF_{i}+eE_{i})+w\Delta X_{t}\;, \tag{2}\]  
\[X_{t+1}=X_{t}+\Delta X_{t+1}\;, \tag{3}\]  
where s, a, c, f, and e are weights associated with the operators, and \(w\) is the inertia weight. The position of an individual is updated as in Equation (3), where t is the present step.  
The process begins with initializing key parameters, including the number of dragonflies (population size), the maximum iteration number, and coefficient values for dragonfly behaviors such as separation, alignment, and cohesion. These coefficients are initialized based on the migration models: Sinusoidal-based (SBDA), Quadratic-based (QBDA), and Linear-based (LBDA). Each migration model defines the initialization and evolution of coefficients. For instance, the sinusoidal model uses trigonometric functions to oscillate coefficients between defined minimum and maximum values, ensuring dynamic adaptation. These migration models guide the dragonflies' interactions, maintaining a balance between exploration and exploitation as they search for optimal feature subsets. The algorithm then randomly generates an initial population of dragonflies to ensure diversity, with each individual representing a potential feature subset.  
During each iteration in the iterative optimization phase, the positions of dragonflies are adjusted based on their distances from each other, enhancing their collaborative search behavior. The fitness of each dragonfly is evaluated using a fitness function, directing the search toward optimal solutions. The IDA updates the coefficients using one of the migration models. Additionally, the operators representing dragonfly behaviors, including attraction (F) and distraction (E), are calculated using specific equations described in [26]. The step vectors and positions of dragonflies are updated accordingly, driving the optimization process toward convergence. Once the iterations are complete, the algorithm selects and returns the best feature subset, representing the most optimal solution. The IDA's workflow is detailed in Algorithm 1.  
IDA has shown superior performance in FS tasks, especially for biomedical datasets, in which it increases the classification accuracy. Because it is able to balance exploration and exploitation very well, it is also very stable and efficient for high-dimensional optimization tasks.