|
Algorithm 1 MFO based Clustering Algorithm. |
|
Begin
-
1:
Initialize
P = population size
MaxIter = maximum number of iterations
= Each Moth with K random cluster centre
-
2:
itr = 1
-
3:
while
do
-
4:
for p = 1 to P do
-
5:
for i = 1 to N do
-
6:
Calculate the Euclidean distance of each data object to cluster centres of
-
7:
Assign to nearest cluster centres of , k= 1 to K
-
8:
Calculate the fitness using (2)
-
9:
end for
-
10:
end for
-
11:
Populate Flames F and their fitness FF
-
12:
Update Moths positions using Flames and logarithmic spiral function mentioned in 8
-
13:
end while
-
14:
Assign Z =
-
15:
return Z
End
|