forward_algorithm: Forward algorithm

Description Usage Arguments Value

Description

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.

Usage

1
forward_algorithm(Y, transition_probs, emission_probs, prior)

Arguments

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

Value

a vector alpha with entries P(X_T = i, Y_1:T = y_1:T) for i=1...M.


Cronjaeger/HotBirdHMM documentation built on May 9, 2019, 6:01 p.m.