Skip to main content
. 2024 Sep 14;24(18):5975. doi: 10.3390/s24185975
Algorithm 1: Pseudo-Code of IZOA-LightGBM
  1. Start the IZOA-LightGBM model.

  2. Input: Dataset.

  3. Perform data preprocessing.

  4. Initialize the LightGBM model.

  5. Define the IZOA fitness function using Equation (1).

  6. Set the number of iterations (T), the number of zebras’ population (z), and the dimension of the problem to be optimized for the IZOA.

  7. Use EOBL, i.e., Equations (6) and (7), to create the initial zebra population.

  8. Evaluate the fitness values of the zebras.

  9. for k=1 : T

  10.   Update the Pioneer Zebra (PZ)

  11.   for i=1 : z

  12.    #Phase 1

  13.    Calculate the new position of the ith zebra using Equation (2).

  14.    Update the position of the ith zebra using Equation (3).

  15.    #Phase 2

  16.    p=rand()

  17.    if p0.5:

  18.     Calculate the new position of the ith zebra using M1 of Equation (4).

  19.    else:

  20.     Calculate the new position of the ith zebra using M2 of Equation (4).

  21.    end if

  22.    Update the position of the ith zebra using Equation (5).

  23.    Use the FDS, i.e., Equations (8) and (9), to update the position of the ith zebra again.

  24.    Save the PZ.

  25.   end for i=1 : z

  26. end for k=1 : T

  27. Input the PZ obtained by the IZOA into the LightGBM model.

  28. Obtain the LightGBM model with optimal hyperparameters.

  29. Evaluate the IZOA-LightGBM model.

  30. Use the optimal IZOA-LightGBM model for detection.

  31. End the IZOA-LightGBM model.