Package dev.nm.stat.hmm
Class HMMRNG
java.lang.Object
dev.nm.stat.markovchain.SimpleMC
dev.nm.stat.hmm.HMMRNG
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
- Direct Known Subclasses:
HiddenMarkovModel
,KnightSatchellTran1995
In a (discrete) hidden Markov model, the state is not directly visible, but
output, dependent on the state, is visible. Each state has a probability
distribution over the possible output tokens (could be continuous). Therefore
the sequence of tokens generated by an HMM gives some information about the
sequence of states. Note that the adjective 'hidden' refers to the state
sequence through which the model passes, not to the parameters of the model;
even if the model parameters are known exactly, the model is still 'hidden'.
In other words, a hidden Markov model is a Markov chain of (hidden) states
and for each state a conditional random number generator (distribution).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HMMRNG
Constructs a hidden Markov model.- Parameters:
PI
- the initial state probabilitiesA
- the state transition probabilities of the homogeneous hidden Markov chainB
- the conditional observation random number generators (distributions)
-
HMMRNG
Copy constructor.- Parameters:
that
- aHiddenMarkovModel
-
-
Method Details
-
seed
public void seed(long... seeds) Description copied from interface:Seedable
Seed the random number/vector/scenario generator to produce repeatable experiments. -
nextDouble
public double nextDouble()Gets the next simulated observation.- Specified by:
nextDouble
in interfaceRandomNumberGenerator
- Overrides:
nextDouble
in classSimpleMC
- Returns:
- next observation
-
next
Gets the next simulated innovation: state and observation.- Returns:
- the next HMM innovation
-