| Algorithm 1: k-means++ clustering |
| Input: X: a data set containing N samples |
| Output: Set of Centroids ()
|
| 1: Choose an initial center uniformly at random from X
|
| 2: Choose the next center , selecting with probability
|
|
|
| //where denotes the minimum distance between sample x to the previously computed centroid; is the centroid selected from the given dataset X//
|
| 3: Repeat Step (2) until we have chosen a total of ‘K’ Centers
|
| 4: Proceed as with the conventional k-means++ algorithm in [38]
|
| 5: Return
|