[−][src]Function bio::stats::hmm::viterbi
pub fn viterbi<O, M: Model<O>>(
hmm: &M,
observations: &[O]
) -> (Vec<State>, LogProb)
Execute Viterbi algorithm on the given slice of Observation
values to get the maximum a
posteriori (MAP) probability.
Arguments
hmm
- theModel
to run the Viterbi algorithm onobservations
- a slice of observation values to use in the algorithm
Result
The resulting pair (s, p) is the Vec<State>
of most probable states given hmm
and observations
as well as the probability (as LogProb
) of path s
.
Type Parameters
O
- the observation typeM
- typeModel
type