Description Usage Arguments Value See Also Examples
View source: R/addtransition.R
The specified transition is added to the model as a transition with non zero probability. Since the transition probabilities from the initial state of the newly specified transition still have to sum up to one, the correspondent constraint is modified accordingly. It is not recommended to use this function to define a big model, as it is much slower than specifying all transitions in advance.
1 | addtransition(x, t)
|
x |
A HMM object. |
t |
The transition, as a two dimensional integer vector. The first element is the number of the initial state and the second one the number of the final state. |
A HMM object similar to the input but with the additional transition.
HMM, addconstraint
1 2 3 4 5 6 | model <- HMM(3)
model <- addtransition(model, c(1,2))
model <- addtransition(model, c(2,3))
model <- addtransition(model, c(3,1))
transitions(model)
constraints(model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.