Hello.

I am trying to use the DisplayKMeans class to show the results of
theexamples of 
clustering<https://cwiki.apache.org/confluence/display/MAHOUT/Clustering+of+synthetic+control+data>.
So how do i customize  or.apache.mahout.clustering.
display.DisplayKMeans to show the results of the examples instead of a
random generated samples.

The readme file says that i have to modify de generateSamples method, so i
did the following:

Path output = new Path("output");
Path inputFolder = new Path(output,new Path("clusters-10"));
Path inputFile = new Path(inputFolder, "part-r-00000");
FileSystem fs = FileSystem.get(inputFolder.toUri(), new Configuration());
org.apache.hadoop.fs.FSDataInputStream di = fs.open(inputFile);
DenseVector dv = new DenseVector();
VectorWritable vw = new VectorWritable();
vw.readFields(di);
SAMPLE_DATA.add(vw);

But it shows me an error

Exception in thread "main" java.lang.IllegalArgumentException: Unknown flags
set: %d [1010011]

Please give me some insights.

Thanks.

Eduardo.

Reply via email to