viterbi: Viterbi algorithm

Description Usage Arguments Value

View source: R/RcppExports.R

Description

Standard viterbi algorithm in the log space

Usage

1
viterbi(initP, trans, lliks, seqlens)

Arguments

initP

matrix of initial probabilities: each column corresponds to a sequence

trans

transition matrix (rows are previous state, columns are next state)

lliks

matrix with emission probabilities for each datapoint and each state. Columns are datapoints and rows are states.

seqlens

length of each subsequence of datapoints (set this to ncol(lliks) if there is only one sequence).

Value

a list with the following arguments:

vpath

viterbi path

vllik

log-likelihood of the viterbi path


lamortenera/kfoots documentation built on May 20, 2019, 7:34 p.m.