Package dev.nm.stat.hmm.mixture
Class MixtureHMMEM
- java.lang.Object
-
- dev.nm.stat.markovchain.SimpleMC
-
- dev.nm.stat.hmm.HMMRNG
-
- dev.nm.stat.hmm.HiddenMarkovModel
-
- dev.nm.stat.hmm.mixture.MixtureHMM
-
- dev.nm.stat.hmm.mixture.MixtureHMMEM
-
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
public class MixtureHMMEM extends MixtureHMM
The EM algorithm is used to find the unknown parameters of a hidden Markov model (HMM) by making use of the forward-backward algorithm. It does the following.- the E step: Compute the conditional expectations given the observations and the current estimates of the parameters.
- the M step: Maximize, with respect to the estimated parameters and the data set, log-likelihood.
- See Also:
- W. Zucchini and I. L. MacDonald, "Hidden Markov Models for Time Series: An Introduction Using R," Boca Raton, Florida, CRC Press, 2009.
- L. R. Rabiner, "A tutorial on hidden Markov models and selected applications in speech recognition," Proceedings of the IEEE, Volume: 77, Issue:2, 257 - 286, Feb 1989."
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MixtureHMMEM.TrainedModel
the result of the EM algorithm
-
Constructor Summary
Constructors Constructor Description MixtureHMMEM(double[] observations, MixtureHMM model0, double epsilon, int maxIterations)
Constructs a mixture HMM model by training an initial model using the Baum-Welch algorithm.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MixtureHMMEM.TrainedModel
train(MixtureHMM model0, double[] observations)
Constructs a trained mixture hidden Markov model, one iteration.-
Methods inherited from class dev.nm.stat.hmm.mixture.MixtureHMM
density, getDistribution
-
Methods inherited from class dev.nm.stat.hmm.HiddenMarkovModel
logProbability, logProbability, logProbability
-
Methods inherited from class dev.nm.stat.hmm.HMMRNG
next, nextDouble, seed
-
-
-
-
Constructor Detail
-
MixtureHMMEM
public MixtureHMMEM(double[] observations, MixtureHMM model0, double epsilon, int maxIterations)
Constructs a mixture HMM model by training an initial model using the Baum-Welch algorithm.- Parameters:
observations
- the observationsmodel0
- an initial modelepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0maxIterations
- the maximum number of iterations
-
-
Method Detail
-
train
public static MixtureHMMEM.TrainedModel train(MixtureHMM model0, double[] observations)
Constructs a trained mixture hidden Markov model, one iteration.- Parameters:
model0
- the initial hidden Markov modelobservations
- the observations- Returns:
- a trained mixture hidden Markov model
-
-