You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Raghuveer <al...@yahoo.com.INVALID> on 2015/05/11 12:25:25 UTC

HMM Model error

When i am trying to run the sample from http://mahout.apache.org/users/classification/hidden-markov-models.html the model is running fine. However when i give a different sequence like below i see the error mentioned below:

echo "0 3 5 8 11 14 17 20 23 26 29 32 35 38 41 44 47 50 53 56 59 62 65 67 70 73 76 79 82 85 88 91 94 97 100 103 106 54 56 57 59 60 62 63 65" > hmm-input

mahout baumwelch -i hmm-input -o hmm-model -nh 3 -no 4 -e .0001 -m 1000 
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
    at org.apache.mahout.math.DenseMatrix.getQuick(DenseMatrix.java:78)
    at org.apache.mahout.classifier.sequencelearning.hmm.HmmAlgorithms.forwardAlgorithm(HmmAlgorithms.java:85)
    at org.apache.mahout.classifier.sequencelearning.hmm.HmmTrainer.trainBaumWelch(HmmTrainer.java:315)
    at org.apache.mahout.classifier.sequencelearning.hmm.BaumWelchTrainer.main(BaumWelchTrainer.java:116)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    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:195)

Kindly suggest how i can get ride of this error.
Regards,Raghuveer