Hi,

My goal is to transform the vectors created by lucene.vector (thanks to kmeans 
clustering) to a human readable format. For that I am using ClusterDumper 
function on eclipse. But that code does not generate none files. What am I 
missing? What is the best approach to transform output of kmeans to a human 
readable (no unix command please I am on windows using eclipse and cygwin).
This is the code:


Code :

Map<Integer, List<WeightedVectorWritable>> result = 
ClusterDumper.readPoints(new Path("output/kmeans/clusters-0"), 2, conf);

            System.out.println(result.get(0).toString());
            for(int j = 0; j < result.size(); j++){
                  List<WeightedVectorWritable> list = result.get(j);
                  for(WeightedVectorWritable vector : list){
                        System.out.println(vector.getVector().asFormatString());
                  }

            }


Error :

Exception in thread "main" java.lang.ClassCastException: 
org.apache.mahout.clustering.iterator.ClusterWritable cannot be cast to 
org.apache.mahout.clustering.classify.WeightedVectorWritable
      at main.LuceneDemo.main(LuceneDemo.java:260)



Thank you


Think green - keep it on the screen.

This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

Reply via email to