ImFusion SDK 4.3
MarkovChain Class Reference

Public Member Functions

void setTransitionProbabilities (const MatrixXd &t)
 Transition matrix is a States x States matrix, where rows are the target state and columns the source states. Defines probability to change from one state to another.
 
void setTransitionProbabilitiesCallback (std::function< double(int stateFrom, int stateTo, int timestepFrom, int timestepTo)> callback)
 Set callback which is evaluating the transition probability given the current observation assignments.
 
void setObservationProbabilities (const MatrixXd &o)
 Observation matrix is a Observation x States matrix. Defines probability to see an observation from a particular state.
 
void setInitialProbabilities (const VectorXd &init)
 Initial probabilities set the probabilities of the state at time t=0.
 
MatrixXd estimate (const MatrixXd &observations, MatrixXd *optStateProbs=nullptr)
 Observations should be a matrix of Observations x Time (row/col respectively)
 
std::vector< int > viterbi (const MatrixXd &observations, MatrixXd *optStateProbs=nullptr, double *logProbability=nullptr, Eigen::MatrixXd *transitionMatrix=nullptr, bool normalize=true, bool logViterbi=false)
 Find most likely sequence of states given observations.
 
std::vector< int > logViterbi (double *logProbability=nullptr)
 Reduced faster version of the viterbi mathod. Same as viterbi with square identity observation matrix and logViterbi set to true.
 

Member Function Documentation

◆ setTransitionProbabilitiesCallback()

void setTransitionProbabilitiesCallback ( std::function< double(int stateFrom, int stateTo, int timestepFrom, int timestepTo)> callback)

Set callback which is evaluating the transition probability given the current observation assignments.

Parameters
callbackCallback When the callback is set the transition probabilities matrix if also set is ignored

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close