Skip to main content
. 2022 Mar 23;19(7):3791. doi: 10.3390/ijerph19073791
Algorithm 2: K-means partition
Input: clusters “k” and it contains “n” number of nodes.
Output: A set of cluster “k” minimized the squared error.
Method
1. Randomly choose the objects (k) in the initial cut.
2. Repeat
3. Similar mean values of the node have been assigned to the cluster.
4. Update the cluster after assigning the new node.
5. until the changes do not occur in the group.