hmm
Creates a first-order Hidden Markov Model from initial, transition, and emission probabilities.
Return
the Hidden Markov Model.
Parameters
the initial state probabilities.
the state transition probability matrix, where a[i][j] is P(s_j | s_i).
the symbol emission probability matrix, where b[i][j] is P(o_j | s_i).
Creates a first-order Hidden Markov Model from initial, transition, and emission probability arrays.
Return
the Hidden Markov Model.
Parameters
the initial state probabilities.
the state transition probability matrix, where a[i][j] is P(s_j | s_i).
the symbol emission probability matrix, where b[i][j] is P(o_j | s_i).
Fits a first-order Hidden Markov Model by maximum likelihood estimation.
Return
the fitted Hidden Markov Model.
Parameters
the observation sequences, of which symbols take values in [0, n), where n is the number of unique symbols.
the state labels of observations, of which states take values in [0, p), where p is the number of hidden states.
Fits a first-order Hidden Markov Model sequence labeler for generic observation objects.
Return
the HMM sequence labeler.
Parameters
the observation sequences.
the state labels of observations, of which states take values in [0, p), where p is the number of hidden states.
a lambda returning the ordinal numbers of symbols in [0, n).
Type Parameters
the data type of observations.