SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.hmm
Class HmmSim

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

public class HmmSim
extends java.lang.Object

This class simulates a (discrete) hidden Markov model as defined by Rabiner (1989).

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
HmmSim(HiddenMarkovModel model)
          Construct a simulator for a (discrete) hidden Markov model.
 
Method Summary
 int[] simObservations(int[] qt)
          Simulate the observations {O_t} (t = 1, 2, ..., T) for a (discrete) hidden Markov model.
 int[] simStates(int T)
          Simulate the hidden states {q_t} (t = 1, 2, ..., T) for a (discrete) hidden Markov model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HmmSim

public HmmSim(HiddenMarkovModel model)
Construct a simulator for a (discrete) hidden Markov model.

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

simStates

public int[] simStates(int T)
Simulate the hidden states {q_t} (t = 1, 2, ..., T) for a (discrete) hidden Markov model.

Parameters:
T - the length of the (univariate) time series (states and observations) to generate
Returns:
states {q_t} (t = 1, 2, ..., T) with the given (discrete) HMM specification.

simObservations

public int[] simObservations(int[] qt)
Simulate the observations {O_t} (t = 1, 2, ..., T) for a (discrete) hidden Markov model.

Parameters:
qt - the hidden states {q_t}
Returns:
observations {O_t} (t = 1, 2, ..., T)

SuanShu, a Java numerical and statistical library

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