Research Article

A Bitwise Design and Implementation for Privacy-Preserving Data Mining: From Atomic Operations to Advanced Algorithms

Algorithm 10

The algorithm of k-means.
ā€‰Input: data X, the number of neighbors k, and the initial value of clusters
ā€‰Output: labeled data (X, l)
(1)Obtain the distance between each cluster and the data X.
(2)For each data, label closest clusters.
(3)Initialize the cluster by averaging the data with the same cluster value.
(4)Repeat steps 1 to 3 to obtain converged clusters and return the labeled data.