2

I think my code is not wrong but, it doesn't work correctly. This is K-means clustering using mapreduce. (https://github.com/30stm/K-Means-using-mapreduce/tree/master)

Make a dataset using DatasetWriter.java, and make centroids using CreateCentroids.java. Then, excute KMeansClusteringJob.java

This code works at the first iteration, but It doesn't work from second iteration. I checked map function and reduce function, I think the problem is reduce function. (Map function finds closest centroid from each point. Reduce function calculate new centroid and replace the new one.) After first iteration, cen.seq (centroid file) is imperfect.

Somebody help me ;)

p.s : I wrote a question about reduce code, my original problem is this one.

4

1 回答 1

0

您链接的代码newCenter.setVector(new double[vectorSize]);newCenter.getVector().

于 2014-10-27T15:15:41.973 回答