Skip to main content
. 2021 Dec 11;21(24):8289. doi: 10.3390/s21248289
Algorithm 1. Hybrid Lightweight Attack Detection System
Input
Si as a set of single sensor datasets, N as NetFlow dataset,
Cj as set of single incremental classifiers (INB, IKNN, HTMC, HTNB, HTNBA),
and W as ensemble WHTE
Output
Pk set of performance metrics (average accuracy, average memory, average CPU time, kappa statistic, precision, recall, concept drift sensitivity)
Begin
At fog devices close to the edge in framework 1
Collect infected sensor data S in Si
Collect infected NetFlow N
for N and each S in Si
 while there is data record in S and N
   Do
     Pre-process the data
     Set the sliding window to 1K records
     Set the maximum memory to 5K records
     Set the initial parameters of each C classifier in Ci
     Set the parameters of each C in W
     for each record in S and N
       Do
        Prequential train and test using W and each C in Ci
        Compute each P in Pk
        return average Pk
        Update parameters of W and each C in Ci
   end for
    end while 
     for each C in Ci and W
      for each P in Pk
       Compute one-way ANOVA
         Assume that all population means are equal
         Initialise p value
         if (p < 0.05).
         then reject
         else accept
         return statistical metrics
         end if
      end for
     end for
    end for
  End