| Algorithm 2: Midpoint method for initial CH nomination |
| Input: |
| X = consists of a total n number of data points. |
| Copt = optimal cluster density |
| Output: |
| initial centroids of the Copt clusters. |
| Steps: |
| 1: Origin (), Data point i () |
| For i = 1:n |
| end |
| 2: Sort () |
| 3: n/Copt. |
| 4: The middle point value of each set is considered as the initial centroid. |