The key in the CSV is the clusterId (and not the named vector).
Here's the complete code snippet which should make sense.
{Code}
Cluster cluster = clusterWritable.getValue();
line.append(cluster.getId());
ListWeightedPropertyVectorWritable points =
Thanks, make sense.
Now in a seperate post we discussed that
*The Clustered output should display the vectors with the vectorid that
belong to a specfic cluster along with the distance of that vector from the
cluster center.*
So, based on the above code, we are loosing few things for named
In the same separate post that u r alluring to it was also discussed that you
should upgrade to 0.9 which fixes that issue and running a seqdumper on
clustered output should give the weight of the vectors and the distance of each
vector from the cluster centroid.
Did u try running a seqdumper
Suneel,
I was going through code of CSVClusterWriter and found that if vector
is an instance of NamedVector then it writes only Key.
if (theVec instanceof NamedVector) {
line.append(((NamedVector)theVec).getName());
} else {
String vecStr = theVec.asFormatString();
Hi,
After running the cluster dumper on Kmeans output I am getting only
Key of Sequence File.
Options provided for cluster dumper is:-
-i cluster-*-final of Kmeans -o Output File -p
clusteredPoint -of CSV
Is it something that I am missing.
PN: I am using sequential mode.
--
Regards
Bikash
I am running cluster dumper
After extracting output from Cluster dump I am transposing the row to
column, hence I have directly called this class from my java code.
Code:
ClusterDumper.main(new String[] {
buildOption(DefaultOptionCreator.INPUT_OPTION),seqFileDir,