You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Erdem Sahin <es...@nyu.edu> on 2015/05/04 16:05:11 UTC

SGD IndexOutOfBoundsException

Hi Mahout users,

We are trying to train an SGD model with 2 classes and running into an
IndexOutOfBounds exception.

It looks like the exception happens after TrainNewsGroups.java calls
learningAlgorithm.close() and while it calls SGDHelper.dissect()

Any help would be appreciated.

Many thanks,
Erdem Sahin

Model Dissection
body=i    -0.0    nowifi    1.0    -0.023956501144642588    2.0
-0.023956501144642588
body=have    -0.0    nowifi    1.0    -0.016857144357448513    2.0
-0.016857144357448513
body=you    -0.0    nowifi    1.0    -0.01673702475723127    2.0
-0.01673702475723127
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 2,
Size: 2
    at java.util.ArrayList.rangeCheck(ArrayList.java:635)
    at java.util.ArrayList.get(ArrayList.java:411)
    at org.apache.mahout.classifier.sgd.SGDHelper.dissect(SGDHelper.java:73)
    at org.apache.mahout.classifier.sgd.TrainNewsGroups.main(
TrainNewsGroups.java:130)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(
ProgramDriver.java:72)
    at org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:144)
    at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:152)
    at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:195)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:212)