|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wiigee.logic.PreciseHMM
public class PreciseHMM
This is a Hidden Markov Model implementation which internally provides the basic algorithms for training and recognition (forward and backward algorithm). Since a regular Hidden Markov Model doesn't provide a possibility to train multiple sequences, this implementation has been optimized for this purposes using some state-of-the-art technologies described in several papers.
| Field Summary | |
|---|---|
double[][] |
a
The state change probability to switch from state A to state B: a[stateA][stateB] |
double[][] |
b
The probability to emit symbol S in state A: b[stateA][symbolS] |
double[] |
pi
The initial probabilities for each state: p[state] |
| Constructor Summary | |
|---|---|
PreciseHMM(int numStates,
int sigmaSize)
Initialize the Hidden Markov Model in a left-to-right version. |
|
| Method Summary | |
|---|---|
double[][] |
getA()
|
double[][] |
getB()
|
double |
getProbability(int[] o)
Returns the probability that a observation sequence O belongs to this Hidden Markov Model without using the bayes classifier. |
void |
print()
Prints everything about this model, including all values. |
double |
scaledViterbi(int[] o)
|
void |
setA(double[][] a)
|
void |
setB(double[][] b)
|
double |
sProbability(int[] o)
|
void |
train(java.util.Vector<int[]> trainsequence)
Trains the Hidden Markov Model with multiple sequences. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public double[] pi
public double[][] a
public double[][] b
| Constructor Detail |
|---|
public PreciseHMM(int numStates,
int sigmaSize)
numStates - Number of statessigmaSize - Number of observations| Method Detail |
|---|
public void train(java.util.Vector<int[]> trainsequence)
public double getProbability(int[] o)
o - observation sequence
public double sProbability(int[] o)
public double scaledViterbi(int[] o)
public void print()
public double[][] getA()
public void setA(double[][] a)
public double[][] getB()
public void setB(double[][] b)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||