Research Article
A Global-Relationship Dissimilarity Measure for the k-Modes Clustering Algorithm
Pseudocode 1
Pseudocodes of KBGRD algorithm.
Input: data set U and initial cluster number ; | Output: clusters. | Sub function Cluster(U, modes) | Begin: | (1) for = to is the number of clusters. | (2) for = to is the number of objects. | (3) Calculating according to Eqs. (2)–(6); | (4) end for | (5) end for | (6) if () | (7) Classify th object into into th cluster; | End | Sub function Fun() | Begin: | (1) for = to is the number of clusters. | (2) for = to is the number of objects. | (3) Calculating SumDissimilarity according to Eq. (7); | (4) return SumDissimilarity; | end | Main function | Begin: | (1) Randomly choose distinct objects as initial modes from ; | (2) Cluster(, modes); | (3) newDissimilarity = Fun(); calculating the value of . | (4) Do | (5) oldDissimilarity = newDissimilarity; | (6) Update modes according to Eq. (9); | (7) Cluster(, modes); | (8) newDissimilarity = Fun(); | (9) while newDissimilarity != oldDissimilarity; | End |
|