mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Farris <d...@apache.org>
Subject Re: Exception while testing reuters data
Date Wed, 22 Jun 2011 20:37:39 GMT
Hi Sharath,

Does the reuters/reuters-vectors-bigram directory contain a
tfidf-vectors directory? If so, try using that as input. If not, what
is in that directory?

This sounds similar to the problem Hector ran into running one of the
examples from the mahout-in-action book.

Thanks,

Drew

On Mon, Jun 20, 2011 at 2:40 PM, sharath jagannath
<sharathjagannath@gmail.com> wrote:
> Hey,
>
> I was testing the kmeans driver using the reuters data.
>
> Commands used:
>
> 1. bin/mahout seqdirectory -c UTF-8 -i reuters/reuters21578 -o
> reuters/reuters-seqfiles
> 2. bin/mahout seq2sparse -i reuters/reuters-seqfiles/ -o
> reuters/reuters-vectors-bigram -ow -a
> org.apache.lucene.analysis.WhitespaceAnalyzer -chunk 200 -wt tf -s 5 -md 3
> -x 90 -ng 1
> 3. bin/mahout kmeans -i reuters/reuters-vectors-bigram/ -c
> reuters/reuters-initial-clusters -o reuters/reuters-kmeans-clusters -dm
> org.apache.mahout.common.distance.SquaredEuclideanDistanceMeasure -k 20
> --maxIter 100
>
> I get the following exception. Am I doing anything wrong?
>
> Exception in thread "main" java.lang.ClassCastException:
> org.apache.hadoop.io.IntWritable cannot be cast to
> org.apache.mahout.math.VectorWritable
>    at
> org.apache.mahout.clustering.kmeans.RandomSeedGenerator.buildRandom(RandomSeedGenerator.java:90)
>    at
> org.apache.mahout.clustering.kmeans.KMeansDriver.run(KMeansDriver.java:102)
>    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>    at
> org.apache.mahout.clustering.kmeans.KMeansDriver.main(KMeansDriver.java:59)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
>    at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
>    at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:188)
>
>
> Thanks,
> Sharath
>

Mime
View raw message