Algorithm 1 Improved salp swarm algorithm. |
-
1:
Initialization parameters: population size N, dimension d, maximum number of iterations T.
-
2:
Generate the initial population X by Equation (1);
-
3:
Calculate the fitness value for each individual;
-
4:
whiledo
-
5:
Update by Equation (3) and by Equation (8);
-
6:
for do
-
7:
if then
-
8:
Update random numbers and ;
-
9:
Update the position of the leader salp as in Equation (2);
-
10:
else
-
11:
Update random numbers , and ;
-
12:
Update the position of the follower salp as in Equation (7);
-
13:
end if
-
14:
Calculation using Equation (9);
-
15:
end for
-
16:
if then
-
17:
;
-
18:
end if
-
19:
Set ;
-
20:
end while
Output: Best classification and predication results. |