26 #ifndef GRT_HMM_HEADER 27 #define GRT_HMM_HEADER 32 #include "../../CoreModules/Classifier.h" 55 HMM(
const UINT hmmType=HMM_CONTINUOUS,
const UINT modelType=HMM_LEFTRIGHT,
const UINT delta=1,
const bool useScaling =
false,
const bool useNullRejection =
false);
79 HMM& operator=(
const HMM &rhs);
132 virtual bool reset();
140 virtual bool clear();
142 virtual bool print()
const;
151 virtual bool save( std::fstream &file )
const;
160 virtual bool load( std::fstream &file );
167 UINT getHMMType()
const;
174 UINT getModelType()
const;
182 UINT getDelta()
const;
189 UINT getNumStates()
const;
196 UINT getNumSymbols()
const;
208 UINT getNumRandomTrainingIterations()
const;
234 bool setHMMType(
const UINT hmmType);
244 bool setModelType(
const UINT modelType);
258 bool setDelta(
const UINT delta);
271 bool setDownsampleFactor(
const UINT downsampleFactor);
282 bool setCommitteeSize(
const UINT committeeSize);
292 bool setNumStates(
const UINT numStates);
300 bool setNumSymbols(
const UINT numStates);
314 bool setNumRandomTrainingIterations(
const UINT numRandomTrainingIterations);
328 bool setSigma(
const Float sigma);
330 bool setAutoEstimateSigma(
const bool autoEstimateSigma);
337 static std::string
getId();
350 bool predict_continuous(
VectorFloat &inputVector );
354 bool loadLegacyModelFromFile( std::fstream &file );
363 UINT numRandomTrainingIterations;
367 UINT downsampleFactor;
370 bool autoEstimateSigma;
375 static const std::string id;
380 #endif //GRT_HMM_HEADER std::string getId() const
virtual bool predict_(VectorFloat &inputVector)
This class acts as the main interface for using a Hidden Markov Model.
virtual bool train(ClassificationData trainingData)
virtual bool save(const std::string &filename) const
UINT hmmType
Controls if this is a HMM_DISCRETE or a HMM_CONTINUOUS.
virtual bool deepCopyFrom(const Classifier *classifier)
virtual bool print() const
This class implements a continuous Hidden Markov Model.
This class acts as the main interface for using a Hidden Markov Model.
This class implements a discrete Hidden Markov Model.
virtual bool train_(ClassificationData &trainingData)
virtual bool load(const std::string &filename)
This is the main base class that all GRT Classification algorithms should inherit from...