Description Usage Arguments Value Author(s) References See Also Examples
Viterbi training is a faster but less reliable alternative to Baum-Welch for parameter estimation.
| 1 2 3 | 
| hmm |  Object of class  | 
| obs | List of observation sequences. | 
| max.iter | Maximum number of iterations. | 
| eps | Minimum change in log likelihood between successive iterations. | 
| df | If this is  | 
| trans.prior | Prior distribution of transition probabilities. A prior can be specified
either by providing a matrix with transition probabilities or by setting  | 
| init.prior | Prior distribution of initial state probabilities. A prior can be specified
either by providing a vector with initial state probabilities or by setting  | 
| keep.models | A character string interpreted as a file name. If  | 
| verbose | Level of verbosity. Allows some control over the amount of output printed to the console. | 
Object of class hmm with the pest parameter estimates (in terms of likelihood) found
during the fitting procedure.
Peter Humburg
Juang, B.-H. and Rabiner, L. R. 1990 A segmental k-means algorithm for estimating parameters of hidden Markov models. IEEE Transactions on Acoustics, Speech, and Signal Processing, 38(9), 1639–1641.
viterbi, baumWelch, viterbiEM, hmm.setup
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## create two state HMM with t distributions
state.names <- c("one","two")
transition <- c(0.035, 0.01)
location <- c(1, 2)
scale <- c(1, 1)
df <- c(4, 6)
hmm1 <- getHMM(list(a=transition, mu=location, sigma=scale, nu=df), 
    state.names)
## generate observation sequences from model
obs.lst <- list()
for(i in 1:50) obs.lst[[i]] <- sampleSeq(hmm1, 100)
## fit an HMM to the data (with fixed degrees of freedom)
hmm2 <- hmm.setup(obs.lst, state=c("one","two"), df=5)
hmm2.fit <- viterbiTraining(hmm2, obs.lst, max.iter=20, df=5, verbose=1)
## fit an HMM to the data, this time estimating the degrees of freedom
hmm3.fit <- viterbiTraining(hmm2, obs.lst, max.iter=20, verbose=1)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.