hmm_loglik | R Documentation |
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 = getOption("mlpack.verbose", FALSE))
input |
File containing observations (numeric matrix). |
input_model |
File containing HMM (HMMModel). |
verbose |
Display informational messages and the full list of parameters and timers at the end of execution. Default value "getOption("mlpack.verbose", FALSE)" (logical). |
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.
A list with several components:
log_likelihood |
Log-likelihood of the sequence. Default value "0" (numeric). |
mlpack developers
# For example, to compute the log-likelihood of the sequence "seq" with the
# pre-trained HMM "hmm", the following command may be used:
## Not run:
hmm_loglik(input=seq, input_model=hmm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.