Research Article

Lung Cancer Detection Using Image Segmentation by means of Various Evolutionary Algorithms

Algorithm 6

Particle swarm optimization [11, 13].
(1)Initialize the velocity and position of all the particles with random values.
(2)Define a fitness function.
(3)Find the fitness value for each particle.
(4)Compare the fitness value with the best fitness. If the fitness values are better, then set the current value as new pbest.
(5)Repeat steps from 3 to 5 for each particle.
(6)Update the velocity using equation (1).
(7)Upgrade the position.
(8)Update gbest.
(9)Repeat steps from 7 to 9 until certain conditions are encountered or for the predefined number of iterations.