mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Videnova, Svetlana" <>
Subject ClusterDumper eclipse human readable output kmeans
Date Mon, 06 Aug 2012 14:33:39 GMT

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);

            for(int j = 0; j < result.size(); j++){
                  List<WeightedVectorWritable> list = result.get(j);
                  for(WeightedVectorWritable vector : list){


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(

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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message