Hi,

I wrote a piece of code with Apache Mahout. I would like to see all my clusters 
with the centers. When I run my code (I copied a little bit below) I got an 
exception:

java.io.IOException: wrong value class: 
org.apache.mahout.clustering.iterator.ClusterWritable@4b15eb2c is not class 
org.apache.mahout.clustering.classify.WeightedPropertyVectorWritable

Could you tell me how I can fix it?

I am using version 0.9.

                KMeansDriver.run(conf, new Path(testDataPoints.toString()), new 
Path(
                                testDataClusters), output, 0.001, 10, true, 
0.0, false);

                SequenceFile.Reader reader = new SequenceFile.Reader(fs, new 
Path(
                                outputName.concat(File.separator)
                                                + Kluster.CLUSTERED_POINTS_DIR 
+ "/part-m-00000"), conf);

                Text clusterName = new Text();
                ClusterWritable centerVector = new ClusterWritable();

                while (reader.next(clusterName, centerVector)) {
                        System.out.println(centerVector.getValue() + " is a 
center of "
                                        + clusterName);
                }

Reply via email to