Learn R Programming

march (version 1.4)

march.dcmm.viterbi: Viterbi algorithm for a DCMM model.

Description

Viterbi algorithm for a DCMM model.

Usage

march.dcmm.viterbi(d, y)

Arguments

d

The march.Dcmm-class on which to compute the most likely sequences of hidden states.

y

The march.Dataset-class to consider.

Value

A list of vectors containing the most likely sequences of hidden states, considering the given model for each sequence of the given dataset.

Examples

Run this code
# NOT RUN {
# Estimation of a DCMM  
set.seed(327)
# Computation of a the simplest DCMM model
model <- march.dcmm.construct(y=pewee,orderHC=1,orderVC=1,M=2,popSize=1,gen=1)
# Extraction of the best sequence of hidden states using the Viterbi algorithm.
bestSeq <- march.dcmm.viterbi(model,pewee)
print(bestSeq)
# }

Run the code above in your browser using DataLab