public class ForwardBackwardProcedure extends Object
αt(i) = p(ω1, ω2, ... ωt, qt = si | λ)The backward probability, β, is the probability of the system in state si at time t, and the partial observations from then onward till time t.
βt(i) = p(ωt+1, ωt+2, ... ωT | qt = si, λ)Our implementation computes a scaled version of the probabilities as discussed in Rabiner.
Constructor and Description |
---|
ForwardBackwardProcedure(HiddenMarkovModel model,
double[] observations)
Constructs the forward and backward probability matrix calculator for an
HMM model.
|
ForwardBackwardProcedure(HiddenMarkovModel model,
int[] observations)
Constructs the forward and backward probability matrix calculator for an
HMM model.
|
Modifier and Type | Method and Description |
---|---|
double |
c(int t) |
double |
logLikelihood()
Gets the likelihood of the given observations.
|
Vector |
scaledAlpha(int t)
Gets the scaled forward probabilities at time t.
|
Vector |
scaledBeta(int t)
Gets the scaled backward probabilities at time t.
|
public ForwardBackwardProcedure(HiddenMarkovModel model, double[] observations)
model
- a (discrete) hidden Markov modelobservations
- an array of observations (length = T).public ForwardBackwardProcedure(HiddenMarkovModel model, int[] observations)
model
- a (discrete) hidden Markov modelobservations
- an array of observations (length = T).public Vector scaledAlpha(int t)
t
- a timepublic Vector scaledBeta(int t)
t
- a timepublic double logLikelihood()
public double c(int t)
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.