资 源 简 介
jHMM is a library and application for handling Hidden Markov Models that is written in Java. The models are encoded in a simple XML format that allows you to have arbitrary states, transitions, and alphabets. The library implements sequence state predictions and Baum-Welch training of the model parameters.
Building
Build the code with ant:
cd hmmant jar
Running
By default, the jar file is setup to generate a prediction from a model and input sequence:
java -jar dist/jhmm.jar model.xml input.txt
You can run a test by doing the following:
cd hmm-datajava -jar ../hmm/dist/jhmm.jar ../models/two-dice-model.xml dice.txt
and you get the output:
1111111111111111111111111111111111111112222222222222222222222222222111111111111111111111111111111111Score = -178.57415471540796
You can also run several other programs using the jhmm.sh script: