Description Usage Arguments Details Value Examples
forwardAlg
performs the Forward Algorithm on a single trajecture of observed chain X
1 | forwardAlg(X, trans, u, sig)
|
X |
a vector of observed states |
trans |
a matrix of transition probability |
u |
a vector of means of Normal distribution for each state (emission probability) |
sig |
a vector of standard deviations of Normal distribution for each state (emission probability) |
forwardAlg
computes the matrix, alpha, where alpha[k,t] = P(Z[t]=k, X[1:t]=x[1:t])
A matrix, alpha.
1 2 3 | set.seed(1221)
df <- generateHMM(num=2,n=10)
forwardAlg(df$X[,1], df$trans, df$u, df$sig)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.