mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiran kumar <kirankumarsm...@gmail.com>
Subject Re: ClusterDumper eclipse human readable output kmeans
Date Mon, 06 Aug 2012 16:00:50 GMT
Hello,
Clusterdump actually shows you the top terms and vectors of centroid and
each document. But to identify what vectors are for your document, You need
to generate points directory when running clustering algorithm and use the
points directory generated in the above step when generating cluster dump.

Thanks,
Kiran Bushireddy.

On Mon, Aug 6, 2012 at 10:33 AM, Videnova, Svetlana <
svetlana.videnova@logica.com> wrote:

> 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.
>
>


-- 
Thanks & Regards,
Kiran Kumar

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