## 2 Material and Methods
### Methodology of the Proposed Prediction Model
#### 2.2.2 Feature Selection Based on IDPSO  
We utilized an advanced dynamic algorithm called IDPSO to identify the optimal subset of features. Our goal was to reduce the number of features while retaining the most effective, relevant, and non-redundant ones. To achieve this, we considered both the number of features and the classification accuracy as crucial factors in our approach. We designed a fitness function based on a multi-objective optimization equation that guided our IDPSO algorithm towards the best feature subset for our purposes. The conventional PSO algorithm employs a population of particles, with each particle representing a possible solution to the problem at hand. As with other meta-heuristic algorithms, PSO operates iteratively. The initial population of particles is generated randomly, and subsequent iterations involve calculations based on the particles' movements toward their individual and global best solutions. The fitness function of the problem is used to evaluate the particles. PSO's performance is modeled on the behavior of birds seeking food sources, meaning that particles strive to locate the best possible solution (i.e., the optimized value of the fitness function). In traditional PSO, each particle moves toward its best memory and the best particle of the population (Equations (7) and (8)). After meeting the stop criteria, the particles are assumed to find the best solution. \[V_{ij}^{(t+1)}=wv_{ij}^{(t)}+c_{1}r1_{ij}(t)\times(y_{ij}(t)-x_{ij}(t))+c_{2}r2 _{ij}(t)\times(\hat{y}_{j}(t)-x_{ij}(t)) \tag{7}\]  
\[x_{ij}^{(t+1)}=x_{ij}^{(t)}+v_{ij}^{(t+1)} \tag{8}\]  
where, \(v_{ij}^{(t)}\) is the velocity in dimension \(j\) at time \(t\). \(x_{ij}(t)\) is the position at time \(t\). \(w\), \(c_{1}\), and \(c_{2}\) are inertia weight and controlling parameters termed cognitive and social coefficients, respectively. \(r1_{ij}\) and \(r2_{ij}\) are random numbers \(\sim\)U (0,1). \(y_{i}(t)\) and \(y_{ij}(t)\) represent the best position of the individual and neighborhood and finally, \(x_{ij}^{(t+1)}\) is the new position at time \(t\) + 1. The movement of particles is shown in Figure 2.  
Regarding the convergence of the PSO algorithm, the mathematical relationship between control parameters given in Equation (9) [33] should be met:  
\[c_{1}+c_{2}<\frac{24(1-w^{2})}{7-5w} \tag{9}\]  
Considering the significant advantages of PSO such as the simplicity in applying and controlling the parameters and fast convergence, many researchers have applied PSO in different steps of image processing. In [34,35], the PSO is applied for the feature selection step. PSO is utilized with convolutional neural networks (CNNs) for classification tasks in [36, 37, 38]. In addition, many other studies have focused on improving the PSO performance to overcome its shortcomings such as falling into local optimums [39, 40, 41, 42, 43, 44]. Due to the large number of potential solutions in this problem, the PSO algorithm is susceptible to getting trapped in local optima, which is one of its main limitations. In this paper, we proposed several updates to the standard PSO algorithm to enhance its performance by preventing it from getting trapped in local optima and enabling it to explore a larger portion of the problem space. We introduced dynamic control parameters (\(c_{1},c_{2}\) and \(c_{3}\)) to guide the movement of PSO towards better solutions based on the leader and best experience of the swarm. The \(c_{3}\) parameter was used to move particles away from the worst particles in the opposite direction, allowing the algorithm to escape from local optima. Additionally, a mutation operation was added to the algorithm, wherein each particle's randomly selected value was updated if it was less than the probability of mutation (_PM_). We also updated the movement of particles to follow not only their best experiences and leaders but also the opposite position of the worst particles (Equation (10)).