| 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. |