Hi Abin,

Thank you very much! Your suggestion helped me a lot.

First, I've set named vector parameter (-nv) to Mahout's vector generation
process (seq2sparse) in order to write more descriptive vectors.

Later, I could use something like this:

IntWritable key= new IntWritable();
WeightedVectorWritable vector = new WeightedVectorWritable();
while (reader.next(key, vector)) {
        NamedVector nv = (NamedVector) vector.getVector();
        System.out.println(nv.getName() + " belongs to cluster " + 
key.toString());
}

Hope this can be useful for someone else, too.

Regards,
Petar

--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-determine-which-cluster-an-item-belongs-to-tp3613013p3615979.html
Sent from the Mahout User List mailing list archive at Nabble.com.

Reply via email to