Research Article
LNNLS-KH: A Feature Selection Method for Network Intrusion Detection
| Input: Training set | | Output: Global best solution, the number of selected features, and feature selection time | (1) Begin: | (2) Initialize algorithm parameters: | (3) Initialize the krill herd position | (4) Evaluate the fitness of krill individuals and find the individuals with the best and worst fitness values | (5) fortodo | (6) for each krill individual do | (7) Calculate the three components of motion: | (8) (1) The motion induced by other krill individuals | (9) (2) The foraging activity | (10) (3) The nonlinear optimized physical diffusion | (11) Implement crossover operator | (12) Update krill herd position and fitness values | (13) Calculate the linear nearest neighbor lasso step and new position using equations (24) and (25), and update new fitness values. | (14) if Kyk > Ki or (Kj) | (16) | Leave Ki or (Kj) and delete Kyk | (17) else | (18) Leave Kyk and delete Ki or (Kj) | (19) end if | (19) end for | (20) Update Xgb and Kgb of the globally optimal individuals | (21) end for | (22) Output the global best solution, the number of selected features and feature selection time | (23) End |
|