Skip to main content
. 2021 Dec 26;22(1):140. doi: 10.3390/s22010140
Algorithm 1 Proposed FS For IoT security.
  • 1:

    Input: total number of generations (T), and  number of agents (N).

  • 2:

    Use Equation (14) to normalize the collected IoT data.

  • 3:

    Using proposed CNN technique to extract the features (as in Section 4.2).

  • 4:

    After extracting the features, divide the data into training and testing sets.

  • 5:

    Use Equation (19) to generate population X.

  • 6:

    Put t=1.

  • 7:

    while t<=T do

  • 8:

       Apply Equation (20) to generate the Binary version of Xi.

  • 9:

       Use Equation (21) to calculate the fitness value Fiti for Xi.

  • 10:

       Find the best agent Xb.

  • 11:

       Enhance Xi as in Equations (2)–(9)

  • 12:

       t=t+1.

  • 13:

    end while

  • 14:

    Remove irrelevant features from testing set that corresponding to zeros in Xb.

  • 15:

    Output: Consider Xb as output and the evaluate the performance.