This package includes code for representing and learning HMM's.
Most of the code in this package was derived from the descriptions
provided in 'A Tutorial on Hidden Markov Models and Selected Applications
in Speach Recognition' by Lawence Rabiner.
Conventions: The keyword argument elem_size will be passed in when
creating numpy array objects.
|
|
calcalpha(stateprior,
transition,
emission,
observations,
numstates,
elem_size=<type 'numpy.float128'>)
Calculates 'alpha' the forward variable. |
source code
|
|
|
|
forwardbackward(stateprior,
transition,
emission,
observations,
numstates,
elem_size=<type 'numpy.float128'>)
Calculates the probability of a sequence given the HMM. |
source code
|
|
|
|
calcbeta(transition,
emission,
observations,
numstates,
elem_size=<type 'numpy.float128'>)
Calculates 'beta' the backward variable. |
source code
|
|
|
|
calcxi(stateprior,
transition,
emission,
observations,
numstates,
alpha=None,
beta=None,
elem_size=<type 'numpy.float128'>)
Calculates 'xi', a joint probability from the 'alpha' and 'beta'
variables. |
source code
|
|
|
|
calcgamma(xi,
seqlen,
numstates,
elem_size=<type 'numpy.float128'>)
Calculates 'gamma' from xi. |
source code
|
|
|
|
baumwelchstep(stateprior,
transition,
emission,
observations,
numstates,
numsym,
elem_size=<type 'numpy.float128'>)
Given an HMM model and a sequence of observations, computes the
Baum-Welch update to the parameters using gamma and xi. |
source code
|
|