Skip to contents

Creates a vector of forward probabilities which is used in most of the functions in this package.

Usage

forward(HM,X,log_sum=F)

Arguments

HM

A HMM class object

X

Data

log_sum

True or False, If True then the log sum trick is used to deal with underflow.

Value

alpha_matrix A matrix of forward probabilities

Details

Does recursive computation of the likelihood which plays a key role in the likelihood evaluation and thus parameter estimation. It is also used in forecasting, decoding and model checking. The recursive nature of the forward algorithm is much more computationally inexpensive than brute-force summation over all possible state sequences.