Algorithm 3 PSO-based Optimal User Clustering |
-
1:
Initialize group size G.
-
2:
Initialize the total number of iterations D.
-
3:
for g = 1:G do
-
4:
Initialize position for particle g.
-
5:
.
-
6:
.
-
7:
end for
-
8:
the position of the maximum in .
-
9:
.
-
10:
t = 1.
-
11:
while
do
-
12:
for g = 1:G do
-
13:
.
-
14:
.
-
15:
if then
-
16:
.
-
17:
.
-
18:
end if
-
19:
end for
-
20:
the position of the maximum in .
-
21:
.
-
22:
t = t + 1.
-
23:
end while
-
24:
.
-
25:
Perform user clustereing with the obtained based on Algorithm 2.
|