Research Article

A Neighbor Prototype Selection Method Based on CCHPSO for Intrusion Detection

Algorithm 1

The CPSO-SK: for a particle I, Pj · xi, Pj · yi, and Pj · y′ denote the position, the personal best position, and the global best particle of the swarm Pj, f represents the fitness function, and b (j, z) return the global solution where the j-th position is z.
Input: the algorithm parameters
Output: the global optimal result.
(1)Repeat
(2)  for each swarm j
(3)   for each particle i
(4)    If f(b(j, Pj · xi))  <  f(b(j, Pj · yi)) then Pj · yi = Pj · xiend if;
(5)    If f(b(j, Pj · yi))  <  f(b(j, Pj · y′)) then Pj · y′ = Pj · yiend if;
(6)   end for
(7)   Perform the position and velocity update using (2), (3), or (4)
(8)  end for
(9)until termination is met;