Research Article

Medical Image Classification Utilizing Ensemble Learning and Levy Flight-Based Honey Badger Algorithm on 6G-Enabled Internet of Things

Algorithm 2

Pseudocode of the proposed LFHBA algorithm.
(1)Initialize the parameters of HBA.
(2)Initialize the number of solutions (N).
(3)Evaluate the fitness of each honey badger position using objective function and assign to , i [1, 2, …, N].
(4)Save best position and assign fitness to .
(5)repeat
(6) Update the decreasing factor using equation (4).
(7) Calculate the intensity using equation (2).
(8) Update the x, y, Levy(D), etc.
(9)for to do
(10)  if r < 0.5 then
(11)   Update the current solution using equation (3).
(12)  else
(13)   Update the current solution using equation (7).
(14)  end if
(15)  Evaluate new position and assign to .
(16)  ifthen
(17)   Set  =  and  = .
(18)  end if
(19)  ifthen
(20)   Set  =  and  = .
(21)  end if
(22)end for
(23)until The iteration criterion has been met.
(24)Return the best solution .