Can you please tell me how is it 107 because i have only 64 elements and if i 
remove all the spaces its 90 elements, can you kindly explain. 


     On Monday, May 11, 2015 5:21 PM, Max Heimel <mhei...@gmail.com> wrote:
   

 Hi Raghuveer,
the crash was caused because you did not provide the correct number of observed 
states (in your case: 107) to the -no argument of the BaumWelch trainer. (The 
trainer expects that the states in the provided sequence are encoded as 
integers from 0 to nr_states-1.)
Max
2015-05-11 12:25 GMT+02:00 Raghuveer <alwaysra...@yahoo.com.invalid>:

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




  

Reply via email to