mlpack
|
#include <mlpack/prereqs.hpp>
#include <mlpack/core/util/io.hpp>
#include <mlpack/core/util/mlpack_main.hpp>
#include "hmm.hpp"
#include "hmm_model.hpp"
#include <mlpack/methods/gmm/gmm.hpp>
#include <mlpack/methods/gmm/diagonal_gmm.hpp>
Classes | |
struct | Generate |
Functions | |
BINDING_NAME ("Hidden Markov Model (HMM) Sequence Generator") | |
BINDING_SHORT_DESC ("A utility to generate random sequences from a pre-trained Hidden Markov " "Model (HMM). The length of the desired sequence can be specified, and a " "random sequence of observations is returned.") | |
BINDING_LONG_DESC ("This utility takes an already-trained HMM, specified as the "+PRINT_PARAM_STRING("model")+" parameter, and generates a random " "observation sequence and hidden state sequence based on its parameters. " "The observation sequence may be saved with the "+PRINT_PARAM_STRING("output")+" output parameter, and the internal state " " sequence may be saved with the "+PRINT_PARAM_STRING("state")+" output" " parameter." "\" "The state to start the sequence in may be specified with the "+PRINT_PARAM_STRING("start_state")+" parameter.") | |
BINDING_EXAMPLE ("For example, to generate a sequence of length 150 from the HMM "+PRINT_MODEL("hmm")+" and save the observation sequence to "+PRINT_DATASET("observations")+" and the hidden state sequence to "+PRINT_DATASET("states")+", the following command may be used: " "\"+PRINT_CALL("hmm_generate", "model", "hmm", "length", 150, "output", "observations", "state", "states")) | |
BINDING_SEE_ALSO ("@hmm_train", "#hmm_train") | |
BINDING_SEE_ALSO ("@hmm_loglik", "#hmm_loglik") | |
BINDING_SEE_ALSO ("@hmm_viterbi", "#hmm_viterbi") | |
BINDING_SEE_ALSO ("Hidden Mixture Models on Wikipedia", "https://en.wikipedia.org/wiki/Hidden_Markov_model") | |
BINDING_SEE_ALSO ("mlpack::hmm::HMM class documentation", "@doxygen/classmlpack_1_1hmm_1_1HMM.html") | |
PARAM_MODEL_IN_REQ (HMMModel, "model", "Trained HMM to generate sequences with.", "m") | |
PARAM_INT_IN_REQ ("length", "Length of sequence to generate.", "l") | |
PARAM_INT_IN ("start_state", "Starting state of sequence.", "t", 0) | |
PARAM_MATRIX_OUT ("output", "Matrix to save observation sequence to.", "o") | |
PARAM_UMATRIX_OUT ("state", "Matrix to save hidden state sequence to.", "S") | |
PARAM_INT_IN ("seed", "Random seed. If 0, 'std::time(NULL)' is used.", "s", 0) | |
Compute the most probably hidden state sequence of a given observation sequence for a given HMM.
mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.