Decoding example (DecodeHMM)*

Visualize sample hidden Markov model

DrawHMM[model[[1]], model[[2]], HMMStyleSequential, AngularOffset->46 Degree, BendA ... Offset1, StateTextFalse, MarkovTextFalse, ObservableStylestyles] ;

[Graphics:../HTMLFiles/index_106.gif]

Visualize sample observation sequence

DrawObservationSequence[obs[[1]], styles, ImageSize400] ;

[Graphics:../HTMLFiles/index_108.gif]

Decode HMM (Viterbi algorithm)

qtst = DecodeHMM[obs[[1]], FloorHMM[model]]

{1, 2, 3, 3, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}

Visualize most likely state sequence

ListPlot[qtst, PlotJoinedTrue, FrameTrue, PlotStyle {Thickness[.01], Red}] ;

[Graphics:../HTMLFiles/index_112.gif]


Created by Mathematica  (October 20, 2003)