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
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
the result of the EM algorithm -
Constructor Summary
ConstructorsConstructorDescriptionMixtureHMMEM
(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
Modifier and TypeMethodDescriptionstatic 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 Details
-
MixtureHMMEM
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 Details
-
train
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
-