Skip to main content
. 2023 Feb 22;13(5):834. doi: 10.3390/diagnostics13050834
Algorithm 1 Pseudocode of the developed AOAHG algorithm
  • 1:

    Initialize the parameters.

  • 2:

    Split the dataset into training and testing sets after extracting the features.

  • 3:

    Initialize the number of solutions (N).

  • 4:

    repeat

  • 5:

          Determine the value of the fitness function.

  • 6:

          Find the best solution.

  • 7:

          Update the MOA value using Equation (1).

  • 8:

          Update the MOP value using Equation (3).

  • 9:

          Calculate the hunger weight of each position using Equations (9) and (10).

  • 10:

        Enhance Hi using Equation (12).

  • 11:

        for i=1 to N do

  • 12:

            for j=1 to Positions do

  • 13:

                  Generate a random values in [0, 1] (Pi, PA, and PH).

  • 14:

                  if Pi > MOA then

  • 15:

                         Position limitations can be adjusted for new seeds.

  • 16:

                         if PA > 0.5 then

  • 17:

                                Update ith solutions’ positions by the first rule in Equation (2).

  • 18:

                         else

  • 19:

                                 Update ith solutions’ positions by the second rule in Equation (2).

  • 20:

                  else

  • 21:

                         if PH > 0.5 then

  • 22:

                                 Update ith solutions’ positions by the first rule in Equation (22).

  • 23:

                         else

  • 24:

                                 Update ith solutions’ positions by the second rule in Equation (22).

  • 25:

    until The iteration (t) criterion has been met.

  • 26:

    Return the best solution.