31 #ifndef GRT_CONTINUOUS_HIDDEN_MARKOV_MODEL_HEADER
32 #define GRT_CONTINUOUS_HIDDEN_MARKOV_MODEL_HEADER
35 #include "../../Util/GRTCommon.h"
36 #include "../../CoreModules/MLBase.h"
50 virtual bool predict_(VectorDouble &x);
88 virtual bool print()
const;
90 UINT getNumStates()
const {
return numStates; }
92 UINT getClassLabel()
const {
return classLabel; }
96 double getPhase()
const {
return phase; }
102 bool setDownsampleFactor(
const UINT downsampleFactor);
128 bool setSigma(
const double sigma);
130 bool setAutoEstimateSigma(
const bool autoEstimateSigma);
136 UINT downsampleFactor;
140 bool autoEstimateSigma;
UINT delta
The number of states a model can move to in a LEFTRIGHT model.
UINT numStates
The number of states for this model.
This class acts as the main interface for using a Hidden Markov Model.
virtual bool predict_(VectorDouble &x)
double loglikelihood
The log likelihood of an observation sequence given the modal, calculated by the forward method...
CircularBuffer< VectorDouble > observationSequence
A buffer to store data for realtime prediction.
virtual bool loadModelFromFile(fstream &file)
MatrixDouble a
The transitions probability matrix.
bool setModelType(const UINT modelType)
virtual bool saveModelToFile(fstream &file) const
double cThreshold
The classification threshold for this model.
virtual bool print() const
UINT classLabel
The class label associated with this model.
UINT modelType
The model type (LEFTRIGHT, or ERGODIC)
VectorDouble pi
The state start probability vector.
UINT timeseriesLength
The length of the training timeseries.
MatrixDouble b
The emissions probability matrix.
bool setDelta(const UINT delta)
MatrixDouble sigmaStates
The sigma value for each state.
vector< UINT > estimatedStates
The estimated states for prediction.