Function bio::stats::hmm::forward

source ·
pub fn forward<O, M: Model<O>>(
    hmm: &M,
    observations: &[O]
) -> (Array2<LogProb>, LogProb)
Expand description

Execute the forward algorithm and return the forward probabilites as LogProb values and the resulting forward probability.

Arguments

  • hmm - the Model to run the forward algorithm on
  • observations - a slice of observation values to use in the algorithm

Result

The resulting pair (P, p) is the forward probability table (P[[s, o]] is the entry for state s and observation o) and the overall probability for observations (as LogProb).

Type Parameters

  • O - the observation type
  • M - type Model type