Assigns the input example to the cluster corresponding to the closest centroid.
Assigns the input example to the cluster corresponding to the closest centroid.
the input Example
the Array of centroids
the assigned cluster index
Transforms an Example RDD into an array of RDD
Transforms an Example RDD into an array of RDD
the input RDD
the output Array
Clustering helper functions.