SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.hmm
Class HiddenMarkovModel

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.hmm.HiddenMarkovModel

public class HiddenMarkovModel
extends java.lang.Object

This class represents a hidden Markov model as defined by Rabiner.

See Also:
"Rabiner, L.R. "A tutorial on hidden Markov models and selected applications in speech recognition," Proceedings of the IEEE. Volume: 77, Issue:2, 257 - 286. Feb 1989."

Constructor Summary
HiddenMarkovModel(HiddenMarkovModel that)
          Copy constructor.
HiddenMarkovModel(Matrix A, Matrix B)
          Construct a (discrete) hidden Markov model with equal initial state probabilities
HiddenMarkovModel(Vector PI, Matrix A, Matrix B)
          Construct a (discrete) hidden Markov model.
 
Method Summary
 ImmutableMatrix A()
          Get the state transition probabilities.
 ImmutableMatrix B()
          Get the observation symbol probabilities.
 int nStates()
          Get the number of states.
 int nSymbols()
          Get the number of distinct observation symbols per state.
 ImmutableVector PI()
          Get the initial state probabilities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiddenMarkovModel

public HiddenMarkovModel(Vector PI,
                         Matrix A,
                         Matrix B)
Construct a (discrete) hidden Markov model.

Parameters:
PI - the initial state probabilities
A - the state transition probabilities
B - the observation symbol probabilities; each row corresponds to one state; each column corresponds to one symbol

HiddenMarkovModel

public HiddenMarkovModel(Matrix A,
                         Matrix B)
Construct a (discrete) hidden Markov model with equal initial state probabilities

Parameters:
A - the state transition probabilities
B - the observation symbol probabilities

HiddenMarkovModel

public HiddenMarkovModel(HiddenMarkovModel that)
Copy constructor.

Parameters:
that - a (discrete) hidden Markov model
Method Detail

PI

public ImmutableVector PI()
Get the initial state probabilities.

Returns:
PI, the initial state probabilities

A

public ImmutableMatrix A()
Get the state transition probabilities.

Returns:
A, the state transition probabilities

B

public ImmutableMatrix B()
Get the observation symbol probabilities.

Returns:
B, the observation symbol probabilities

nStates

public int nStates()
Get the number of states.

Returns:
N, the number of states

nSymbols

public int nSymbols()
Get the number of distinct observation symbols per state.

Returns:
M, the number of distinct observation symbols per state

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.