Algorithm 1. Cluster Setup Algorithm |
Inputs: (1) n objects |
(2) k—number of clusters |
Result:k clusters of different sizes |
1: Each object constitutes an initial cluster; |
2: Current cluster number k’ = n; |
3: while (k’ > k) |
4: for i = 1 → k’
|
5: for j = 1 → k’
|
6: if i ~= j
|
7: calculate the distance of the two nodes in the two clusters Ci and Cj; |
8: build a distance set D and obtain the distance mean Davg and the variance δ2; |
9: calculate the clustering factor of clusters Ci and Cj
|
10: end if |
11: end for |
12: end for |
13: combine the two clusters corresponding to Fmax
|
14: k’--; |
15: end while |