The basic k-means clustering algorithm is a simple algorithm that separates the given data space into different clusters based on centroids calculation using some proximity function. Using this algorithm, we first choose the k- points as initial centroids and then each point is assigned to a cluster with the closest centroid. The algorithm is formally described as follows:

**Input:**A data set D containing m objects (points) with n attributes in an Euclidean space

**Output:**Partitioning of m objects into k-clusters C

_{1,}C

_{2}, C

_{3,}…, C

_{k},

*i.e.*C

_{i}⊂ D and C

_{i}∩ C

_{j}= ᶲ (for 1 ≤ i, j ≤ k)