mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: Array out of bounds in the KMeans driver
Date Sun, 20 Dec 2009 00:14:34 GMT
Oh, duh. We'll, being extremely short can't be a good sign.

On Sat, Dec 19, 2009 at 7:13 PM, Benson Margulies <bimargulies@gmail.com> wrote:
> Well, hmm. How would I inspect the result of the lucene Driver to see
> if, in fact, it favored me with any actual vectors?
>
> On Sat, Dec 19, 2009 at 5:31 PM, Drew Farris <drew.farris@gmail.com> wrote:
>> The stack trace below suggests that the input file may not contain any
>> vectors because the code inside the while loop at 77, (esp. the
>> conditional starting at line 82) never fired and thus either (or both)
>> chosenTests or chosenClusters is empty.
>>
>> There should likely be some form of bounds check on line 98 of
>> RandomSeedGenerator, but that woundn't solve the problem if the input
>> file is empty.
>>
>> On Sat, Dec 19, 2009 at 5:07 PM, Benson Margulies <bimargulies@gmail.com> wrote:
>>> ../hadoop-0.20.1/bin/hadoop jar
>>> examples/target/mahout-examples-0.3-SNAPSHOT.job
>>> org.apache.mahout.clustering.kmeans.KMeansDriver  --input
>>> testdata/he_mahout_vector -c clusters -o output -m
>>> org.apache.mahout.common.distance.ManhattanDistanceMeasure -k 7
>>>
>>>
>>> 09/12/19 17:02:18 WARN util.NativeCodeLoader: Unable to load
>>> native-hadoop library for your platform... using builtin-java classes
>>> where applicable
>>> 09/12/19 17:02:18 INFO compress.CodecPool: Got brand-new decompressor
>>> 09/12/19 17:02:18 INFO compress.CodecPool: Got brand-new compressor
>>> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index:
>>> 0, Size: 0
>>>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>>        at java.util.ArrayList.get(ArrayList.java:322)
>>>        at org.apache.mahout.clustering.kmeans.RandomSeedGenerator.buildRandom(RandomSeedGenerator.java:94)
>>>        at org.apache.mahout.clustering.kmeans.KMeansDriver.main(KMeansDriver.java:158)
>>>        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.RunJar.main(RunJar.java:156)
>>>
>>
>

Mime
View raw message