|
Algorithm 2 calFitness Algorithm. |
|
Input:
Output: particleSwarmFitness
-
1:
// Run in worker Node c
-
2:
functioncalFitness()
-
3:
particleSwarmBCValue = particleSwarmBC.value
-
4:
for 1 ≤ i ≤ particleSwarmBCValue do
-
5:
dataWithClusterK ← K-means clustering with .position as the cluster center using
-
6:
Calculate the objective function value as the local fitness value based on (2) and the dataWithClusterK
-
7:
Calculate the objective function value as the local fitness value based on (3) and the dataWithClusterK
-
8:
end for
-
9:
return particleSwarmFitness
-
10:
end function
|