A serializable HMM model that also stores the type. More...
Public Member Functions | |
HMMModel (const HMMType type=HMMType::DiscreteHMM) | |
Construct a model of the given type. More... | |
HMMModel (const HMMModel &other) | |
Copy another model. More... | |
HMMModel (HMMModel &&other) | |
Take ownership of another model. More... | |
~HMMModel () | |
Clean memory. More... | |
HMM< gmm::DiagonalGMM > * | DiagGMMHMM () |
HMM< distribution::DiscreteDistribution > * | DiscreteHMM () |
Accessor methods for discreteHMM, gaussianHMM, gmmHMM, and diagGMMHMM. More... | |
HMM< distribution::GaussianDistribution > * | GaussianHMM () |
HMM< gmm::GMM > * | GMMHMM () |
HMMModel & | operator= (const HMMModel &other) |
Copy assignment operator. More... | |
HMMModel & | operator= (HMMModel &&other) |
Move assignment operator. More... | |
template < typename ActionType , typename ExtraInfoType > | |
void | PerformAction (util::Params ¶ms, ExtraInfoType *x) |
Given a functor type, perform that functor with the optional extra info on the HMM. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the model. More... | |
HMMType | Type () |
A serializable HMM model that also stores the type.
Definition at line 34 of file hmm_model.hpp.
Construct a model of the given type.
Definition at line 50 of file hmm_model.hpp.
References mlpack::hmm::DiagonalGaussianMixtureModelHMM, mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.
Copy another model.
Definition at line 68 of file hmm_model.hpp.
References mlpack::hmm::DiagonalGaussianMixtureModelHMM, mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.
Take ownership of another model.
Definition at line 88 of file hmm_model.hpp.
References mlpack::hmm::DiscreteHMM.
|
inline |
Clean memory.
Definition at line 154 of file hmm_model.hpp.
|
inline |
Definition at line 235 of file hmm_model.hpp.
|
inline |
Accessor methods for discreteHMM, gaussianHMM, gmmHMM, and diagGMMHMM.
Note that an instatiation of this class will only contain one type of HMM (as indicated by the "type" instance variable) - the other two pointers will be NULL.
For instance, if the HMMModel object holds a discrete HMM, then: type –> DiscreteHMM gaussianHMM –> NULL gmmHMM –> NULL diagGMMHMM –> NULL discreteHMM –> HMM<DiscreteDistribution> object and hence, calls to GMMHMM(), DiagGMMHMM() and GaussianHMM() will return NULL. Only the call to DiscreteHMM() will return a non NULL pointer.
Hence, in practice, a user should be careful to first check the type of HMM (by calling the Type() accessor) and then perform subsequent actions, to avoid null pointer dereferences.
Definition at line 232 of file hmm_model.hpp.
|
inline |
Definition at line 233 of file hmm_model.hpp.
Definition at line 234 of file hmm_model.hpp.
Copy assignment operator.
Definition at line 103 of file hmm_model.hpp.
References mlpack::hmm::DiagonalGaussianMixtureModelHMM, mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.
Move assignment operator.
Definition at line 134 of file hmm_model.hpp.
References mlpack::hmm::DiscreteHMM.
|
inline |
Given a functor type, perform that functor with the optional extra info on the HMM.
Definition at line 168 of file hmm_model.hpp.
References mlpack::hmm::DiagonalGaussianMixtureModelHMM, mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.
|
inline |
Serialize the model.
Definition at line 182 of file hmm_model.hpp.
References CEREAL_POINTER, mlpack::hmm::DiagonalGaussianMixtureModelHMM, mlpack::hmm::DiscreteHMM, mlpack::hmm::GaussianHMM, and mlpack::hmm::GaussianMixtureModelHMM.
|
inline |
Definition at line 211 of file hmm_model.hpp.