When I run kmeans clustering in Mahoot I get two folders, clusters-x and clusteredPoints.
I have read cluster centers using cluster dumper, but I somehow can't get to clusteredPoints? Concretely, I need to do it from code.
The strange thing is that I file size in clusteredPoints is always 128 bytes, and when I try to loop through results, using next code, it just goes out of the loop, like there is no result, but I get the cluster centers, which leads to assumption that points are clustered.
IntWritable key = new IntWritable();
WeightedPropertyVectorWritable value = new WeightedPropertyVectorWritable();
while (reader.next(key, value)) {
System.out.println(
value.toString() + " belongs to cluster " + key.toString());
}
It just goes out of the loop?
It is really strange, any help would be great, thanks.