Skip to main content
. 2021 Dec 28;22(1):185. doi: 10.3390/s22010185
Algorithm 1 Pseudocode of Dataset Sampling
Input: A list of N-BaIoT files F
Output: Balanced dataset
DF an empty list
s size of data frame
for each file fF do:
 Import the file f as data frame df
 Count the size sdf of the df
 Append data frame to dfDF
End for
threshold θ the smallest data frame size s(df)
For alldfDF AND s(df)>θ do:
p percent of data %
 Sample dataset as dfi(θdf)*100%
End For
Return dfi as csv format
End