Description Usage Arguments Value
Computes alpha_T[i] = P(X_T = i, Y_1:T = y_1:T) for i=1...M, where M is the
number of hidden states, using the so-called forward-algorithm. This
implementation is less numerically stable than
forward_algorithm_logspace
, which is otherwise identical, but works in
logspace instead.
1 | forward_algorithm(Y, transition_probs, emission_probs, prior)
|
Y |
sequence of observed emissions |
emission_probs |
a vector of emission probabilities. The ith entry is interpreted as the probability of Y=1 given X=i. |
prior |
a vector encoding the a prior distribution on X0; not X[1], but the stete preceding it, i.e. there is no observed emission of the variable X0 |
trnasition_probs |
an M-by-M matrix of transition probabilities |
a vector alpha with entries P(X_T = i, Y_1:T = y_1:T) for i=1...M.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.