Hidden Markov Model (HMM) Sequence Log-Likelihood
>>> from mlpack import hmm_loglik
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:
>>> hmm_loglik(input=seq, input_model=hmm)
- input (numpy matrix or arraylike, float dtype): [required] File containing observations,
- input_model (mlpack.HMMModelType): [required] File containing HMM.
- copy_all_inputs (bool): If specified, all input parameters will be deep copied before the method is run. This is useful for debugging problems where the input parameters are being modified by the algorithm, but can slow down the code.
- verbose (bool): Display informational messages and the full list of parameters and timers at the end of execution.
The return value from the binding is a dict containing the following elements:
- log_likelihood (float): Log-likelihood of the sequence.