To convert a R implementation of forward algorithm to C implementation.
The R function that we are planning to convert to C is called
forward()
. The R script is here. To run
this function please see
here.
This R function is adapted from the depmixS4 package. We revised it because of the original one have scaling problems when the emmission density is very small. We applied the log sum exponetial trick to avoid this.
The original R implementation is here, the accompanied c implementation is here and here .