## 4 Framework
### HPA-C Framework
A flow chart of the proposed HPA-C is shown in Figure 1.  
```
0: objective_function: Function to be maximized
1: num_samples: Number of features
2: lb: Search space lower bounds
3: ub: search space upper bounds
4: num_wolves: Number of wolves
5: max_iterations: Maximum number of iterations
6: selected_samples: Best solution found
7: accuracy: Fitness value of the best solution
8:\(wolves\leftarrow\) InitializeWolves(\(num\_wolves\), \(num\_samples\))
9: UpdateWolves(\(wolves\), \(objective\_function\), \(lb\), \(ub\)) \(\triangleright\) Initial evaluation
10: SortWolves(\(wolves\), \(objective\_function\))
11:for\(iteration=1\)to\(max\_iterations\)do
12:\(a\gets 2-iteration\cdot(2/max\_iterations)\)
13:for\(i=1\)to\(num\_wolves\)do
14: UpdatePosition(\(wolves[i]\), \(alpha\_wolf\), \(beta\_wolf\), \(delta\_wolf\), \(a\), \(lb\), \(ub\))
15:endfor
16: UpdateWolves(\(wolves\), \(objective\_function\), \(lb\), \(ub\))
17: SortWolves(\(wolves\), \(objective\_function\))
18:endfor
19:Return\(\alpha\_wolf\) as selected_samples and its fitness as accuracy

Figure 1: HPA-C flow diagram. ```
1:procedureUpdatePosition(\(\mathit{wolf}\), \(\mathit{alpha\_wolf}\), \(\mathit{beta\_wolf}\), \(\mathit{delta\_wolf}\), \(\mathit{a\_lb}\), \(\mathit{ub}\))
2:for\(j=1\)to\(\mathit{num\_samples}\)do
3: % GWO Component
4:\(X1\leftarrow\mathit{alpha\_wolf}[j]-A1\cdot|C1\cdot alpha\_wolf[j]-\mathit{ wolf}[j]|\)
5: % ABC Component
6:\(X2\gets\mathit{wolf}[j]+\phi\cdot(\mathit{beta\_wolf}[j]-\mathit{wolf}[j])\)
7: % BAT Component
8:\(\mathit{velocities}[i][j]\leftarrow\mathit{velocities}[i][j]+(\mathit{delta\_wolf}[j]- \mathit{wolf}[j])\cdot rand()\)
9:\(X3\gets\mathit{wolf}[j]+\mathit{velocities}[i][j]\)
10: % Compute the final position using maximum selection
11:\(P1\leftarrow\max(X1,X2,X3)\)
12: % Apply boundary constraints
13:\(\mathit{wolf}[j]\leftarrow\max(\min(P1,\mathit{ub}[j]),\mathit{lb}[j])\)
14: % Binary discretization (Thresholding at 0.5)
15:\(\mathit{wolf}[j]\gets 1\) if \(\mathit{wolf}[j]>0.5\), 0 otherwise
16:endfor
17: % Evaluate fitness of the updated wolf
18:\(\mathit{fitness\gets objective\_function}(\mathit{wolf})\)
19:return\(\mathit{fitness}\)
20:endprocedure
```

**Algorithm 2** UpdatePosition (Using X1, X2, X3 and Max Selection)

### Convergence Analysis of HPA-C

It is generally accepted that performing convergence analysis of an NI process is arduous and often needless. There may be multiple reasons behind this conjecture: (1) NI processesare often stochastic in nature, making their behavior impossible to predict, even under identical initial conditions [54]. (2) They usually involve complex interactions among multiple components, thereby creating nonlinear and unpredictable dynamics [55]. However, the convergence criteria can be defined--in this case, based on the following conditions:

1. Decreasing Step Size:

\[\mathit{a}\]

must decrease linearly from 2 to 0 over iterations. 2. Diversity Maintenance: * Random components \(r_{1}\), \(r_{2}\), and \(\phi\) ensure that the population maintains diversity. * Velocity update in the BAT component prevents premature convergence. * Binary thresholding ensures that selected features remain in a valid discrete space. 3. Boundary Handling: \[X_{i}=\max(\mathrm{lb},\min(X_{i},\mathrm{ub})),\] (16) that is, the positions must be bounded within the lower and upper bounds \([\mathrm{lb},\mathrm{ub}]\). 4. Stability and Convergence:* The algorithm should converge if the classification accuracy stabilizes and does not show significant changes over iterations. * Mathematically, the convergence condition is expressed as follows: \[\lim_{k\to\infty}f(\alpha^{k})=f(\mathbf{X}^{*})\] (17) where \(k\) is the iteration number, \(\alpha^{k}\) is the position of the alpha wolf at iteration \(k\), and \(\mathbf{X}^{*}\) represents the global optimum solution maximizing classification accuracy. ### Complexity Analysis of HPA-C

The time complexity analysis of HPA-C is discussed in this section.