## 4 Proposed EHMFFL Algorithm
### Feature Selection Using PCC-GWO
#### 4.1.2 Feature Subset Selection Using GWO  
The GWO was originally introduced by [PERSON] et al. [39]. It is based on the hunting behavior and social order of grey wolves found in nature. The social hierarchy of grey wolves is described by four types of wolves, which are the following:  
* Alpha (\(\alpha\)): the finest solution;
* Beta (\(\beta\)): the second best solution;
* Delta (\(\delta\)): the third best solution;
* Omega (\(\omega\)): the rest of the grey wolves. Similar to other metaheuristic algorithms, the GWO initiates its search procedure by creating an initial population of viable solutions. Subsequently, it undergoes iterative phases, comprising a fitness assessment and population adaptation, until it fulfills a predefined stopping condition, such as reaching a specific number of iterations. Representation of Feasible Solutions: The encoding of a feasible solution \(X\) (i.e., a grey wolf) is depicted in Figure 3. If the quantity of the \(i\)-th variable is equal to 1, the feature \(i\) is selected by the grey wolf; otherwise, it is not picked. Consequently, a value of 1 is used to represent the feature subset's scope, which is expressed as follows:  
\[X(i)=\left\{ \begin{array}{ll}1&\quad if\;feature\;i\;is\;selected\\ 0&\quad otherwise\end{array} \right.. \tag{2}\]  
Initial Population Generation: As mentioned above, the original GWO algorithm starts its search process with a random population of grey wolves. However, in the proposed combined PCC-GWO algorithm, the importance scores of the features obtained by the PCC  
Figure 3: Representation of a feasible solution. are utilized to generate a set of near-optimal initial solutions for the GWO. To achieve this purpose, at first the normalized importance score for each feature \(i\) is calculated and, then, the probability of feature \(i\) to be selected in each solution (grey wolf) \(s\) can be expressed using the roulette wheel selection method, as follows:  
\[NIS_{i}=\frac{IS_{i}-\min(ISs)}{\max(ISs)-\min(ISs)}. \tag{3}\]  
Fitness Evaluation: The original dataset is separated into train and test datasets. The train dataset is considered for the optimization procedure via the GWO by means of K-fold cross-validation. However, the test dataset is unseen for the final evaluation of the generalizability of the trained model. The following is the fitness function of the GWO to assign the quality of each solution, which aims to be maximized:  
\[\text{maximize }Fitness=\left(\mu\times accuracy+(1-\mu)\times\frac{Number \,of\,all\,features}{Number\,of\,selected\,features}\right), \tag{4}\]  
where _accuracy_ is the total accuracy of the base learner using the validation dataset, and \(\mu\) is a parameter (0 < \(\mu\) < 1) that determines the relative importance of accuracy and the number of selected features on the fitness value. The higher \(\mu\), the higher impact of _accuracy_ on the fitness value. We consider \(\mu\) = 0.99 to ensure that high-accuracy solutions are achieved, while the number of features in the second rank is minimized. Population Updating: At every iteration of the GWO, after the fitness evaluation of all the wolves, the first three best wolves, \(\alpha\), \(\beta\), and \(\delta\), are in charge of leading the optimizer's hunting process, while \(\omega\) simply obeys and follows them. Encircling, hunting, and attacking are the three well-organized steps that the GWO does during the optimization process. The following equations were used to determine the encircling process:  
\[\overset{\rightarrow}{D}=\Big{|}\overset{\rightarrow}{C}\cdot\overset{ \rightarrow}{X}_{p}(t)-\overset{\rightarrow}{X}(t)\Big{|}, \tag{5}\]  
\[\overset{\rightarrow}{X}(t+1)=\overset{\rightarrow}{X}_{p}(t)+\overset{ \rightarrow}{A}\cdot\overset{\rightarrow}{D}, \tag{6}\]  
where \(t\) indicates the number of iterations, \(X\) represents the location vector of the wolf, and \(X_{p}\) represents the location vector of the prey.