Skip to contents

Local_decoder calculate the states that are most probable for time frame that the data covers.

Usage

local_decoder(X,HM)

Arguments

X

Data

HM

A HMM object

Value

A vector containing the states that are most probable given our model and data.

Details

The function uses the state_prob function to calculate which state would be most likely to yield the data. Note that this is the local decoder will give the state most probable for each separate time, and will not yield the sequence of state that is most probable to emit the data. That sequence is returned by the Viterbi function.