12#ifndef MLPACK_METHODS_HMM_HMM_MODEL_HPP
13#define MLPACK_METHODS_HMM_HMM_MODEL_HPP
89 discreteHMM(other.discreteHMM),
90 gaussianHMM(other.gaussianHMM),
92 diagGMMHMM(other.diagGMMHMM)
96 other.gaussianHMM = NULL;
98 other.diagGMMHMM = NULL;
145 template<
typename ActionType,
146 typename ExtraInfoType>
150 ActionType::Apply(*discreteHMM, x);
152 ActionType::Apply(*gaussianHMM, x);
154 ActionType::Apply(*gmmHMM, x);
156 ActionType::Apply(*diagGMMHMM, x);
160 template<
typename Archive>
163 ar & BOOST_SERIALIZATION_NVP(type);
166 if (Archive::is_loading::value)
180 ar & BOOST_SERIALIZATION_NVP(discreteHMM);
182 ar & BOOST_SERIALIZATION_NVP(gaussianHMM);
184 ar & BOOST_SERIALIZATION_NVP(gmmHMM);
190 ar & BOOST_SERIALIZATION_NVP(diagGMMHMM);
A serializable HMM model that also stores the type.
HMM< gmm::GMM > * GMMHMM()
HMMModel(const HMMType type=HMMType::DiscreteHMM)
Construct a model of the given type.
HMM< distribution::GaussianDistribution > * GaussianHMM()
HMMModel(HMMModel &&other)
Take ownership of another model.
void serialize(Archive &ar, const unsigned int version)
Serialize the model.
void PerformAction(ExtraInfoType *x)
Given a functor type, perform that functor with the optional extra info on the HMM.
HMM< distribution::DiscreteDistribution > * DiscreteHMM()
Accessor methods for discreteHMM, gaussianHMM, gmmHMM, and diagGMMHMM.
HMMModel(const HMMModel &other)
Copy another model.
HMM< gmm::DiagonalGMM > * DiagGMMHMM()
HMMModel & operator=(const HMMModel &other)
Copy assignment operator.
A class that represents a Hidden Markov Model with an arbitrary type of emission distribution.
BOOST_CLASS_VERSION(mlpack::hmm::HMMModel, 1)
Set the serialization version of the HMMModel class.
@ DiagonalGaussianMixtureModelHMM
@ GaussianMixtureModelHMM
Linear algebra utility functions, generally performed on matrices or vectors.