31 #ifndef GRT_DISCRETE_HIDDEN_MARKOV_MODEL_HEADER
32 #define GRT_DISCRETE_HIDDEN_MARKOV_MODEL_HEADER
35 #include "../../Util/GRTCommon.h"
36 #include "../../CoreModules/MLBase.h"
66 double predict(
const UINT newSample);
67 double predict(
const vector<UINT> &obs);
69 bool resetModel(
const UINT numStates,
const UINT numSymbols,
const UINT modelType,
const UINT delta);
70 bool train(
const vector< vector<UINT> > &trainingData);
90 bool randomizeMatrices(
const UINT numStates,
const UINT numSymbols);
91 double predictLogLikelihood(
const vector<UINT> &obs);
93 bool train_(
const vector< vector<UINT> > &obs,
const UINT maxIter, UINT ¤tIter,
double &newLoglikelihood);
94 virtual bool print()
const;
96 VectorDouble getTrainingIterationLog()
const;
103 VectorDouble trainingIterationLog;
107 UINT numRandomTrainingIterations;
108 double logLikelihood;
111 vector< UINT > estimatedStates;
116 #endif //GRT_HIDDEN_MARKOV_MODEL_HEADER
This class acts as the main interface for using a Hidden Markov Model.
virtual bool saveModelToFile(fstream &file) const
virtual bool loadModelFromFile(fstream &file)
virtual bool print() const