Initialise the current positions and the Pi_best positions of all the particles |
Do |
Calculate mbest in Equation (2) |
Select a suitable value for α
|
For particles i = 1 to S
|
1. Calculate the fitness value of particle i according to classification accuracy |
2. Update Pi_best and Pglobal in Equation (7) |
3. For dimension 1 to d
|
φ = rand (0,1) |
u = rand (0,1) |
If s = rand (0,1) ≥ 0.5 |
update particle positions in Equation (4) |
else |
update particle positions in Equation (3) |
Until terminal condition is satisfied. |