*2.1.* k*-means Algorithm*

Given a data set, the objective of this algorithm is to *set k* groups to classify them, where *k* represents the number of groups previously specified by the analyst or by some method to select the ideal number of classes. When *k*-means classifies the objects, the objects within the same group are as similar as possible, while the objects in different groups are as different as possible; each group is represented by the center or middle of the data points that belong to the group [7]. The basic pseudocode is:
