Skip to main content
. 2022 Apr 22;22(9):3236. doi: 10.3390/s22093236
Algorithm 1: K-means++ Clustering Algorithm
Input: initial cluster number k*, point set S
Output: cluster set CL={CL1,CL2,CLi,CLK}
/*Initialization*/
1: randomly select an initial center c1 uniformly from S
2: Repeat
3: choose the next clustering center ci by Equation (6)
4: until k* clustering centers selected
/*Cluster Formation*/
5: Repeat
6: cluster the points in S by Equation (7)
7: update the clustering centers by Equation (8)
8: until  C converges