Research Article

Towards Effective Network Intrusion Detection: A Hybrid Model Integrating Gini Index and GBDT with PSO

Algorithm 2

PSO algorithm.
1. for each do
2.  Randomly initialize the position and velocity of current particle.
3.  Mark the position of current particle as its best-known position, .
4. end for
5. Calculate the global best known position .
6. for each do
7.  for each do
8.   Update the position and velocity of the ith particle based on (9) and (10).
9.   iffitness > fitness then
10.    
11.   end if
12.   iffitness > fitness then
13.    
14.   end if
15. end for
16. end for