Skip to main content
. 2022 Nov 15;22(22):8814. doi: 10.3390/s22228814
Algorithm 3 Select_Cluster_Center.
Input: Currently partitioned dataset dd
Output: cc
1  Statistical local density is sorted and calculated and stored in normal_den;
2  for i in dd
3      Statistical local density is sorted and calculated and stored in normal_dis;
4      gama = normal_den*normal_dis  // Preparing the product of the two parts for drawing the γ graph;
5      Use plt.plot to draw a gama graph for γ;
6         for j in range(len(gama))
7              R.append(gama[i]-gama[i + 1])  //The height difference between front and rear is stored in R.
8              Calculate height difference mean in R, filter out the pre-cluster center is stored in K;
9         Compare the height difference in K, find the maximum height difference, and select the larger data point as the maximum discontinuity point;
10         Screen out the points greater than or equal to the maximum discontinuity point as the final cluster center and store it in cc, and update the labels of the dataset dd;
11     end for
12  end for
13  return cc