A utility for computing the log-likelihood of a sequence for Hidden Markov Models (HMMs). Given a pre-trained HMM and an observation sequence, this computes and returns the log-likelihood of that sequence being observed from that HMM.
hmm_loglik(input, input_model, verbose = FALSE)
A list with several components:
Log-likelihood of the sequence. Default value "0" (numeric).
File containing observations (numeric matrix).
File containing HMM (HMMModel).
Display informational messages and the full list of parameters and timers at the end of execution. Default value "FALSE" (logical).
mlpack developers
This utility takes an already-trained HMM, specified with the "input_model" parameter, and evaluates the log-likelihood of a sequence of observations, given with the "input" parameter. The computed log-likelihood is given as output.
# For example, to compute the log-likelihood of the sequence "seq" with the
# pre-trained HMM "hmm", the following command may be used:
if (FALSE) {
hmm_loglik(input=seq, input_model=hmm)
}
Run the code above in your browser using DataLab