estimate_params(self,
transition_counts,
emission_counts)
| source code
|
Get a maximum likelihood estimation of transition and emmission.
Arguments:
o transition_counts -- A dictionary with the total number of counts of
transitions between two states.
o emissions_counts -- A dictionary with the total number of counts of
emmissions of a particular emission letter by a state letter.
This then returns the maximum likelihood estimators for the
transitions and emissions, estimated by formulas 3.18 in Durbin et
al:
a_{kl} = A_{kl} / sum(A_{kl'}) e_{k}(b) = E_{k}(b) /
sum(E_{k}(b'))
Returns: Transition and emission dictionaries containing the maximum
likelihood estimators.
|