Evaluation of the negative HMM log-likelihood function based on the forward algorithm, written in C++
(internal function, called by the function npllHSMM
).
nll_Rcpp(allprobs, gamma, delta, T_y)
matrix containing the state-dependent distribution values for each observation (row) and state (column), respectively.
transition probability matrix.
initial distribution.
number of observations.
Returns the negative log-likelihood value.