Description Usage Arguments Details Value See Also Examples

emMixHMM implements the maximum-likelihood parameter estimation of a mixture of HMM models by the Expectation-Maximization (EM) algorithm, known as Baum-Welch algorithm in the context of mixHMM.

1 2 3 |

`Y` |
Matrix of size |

`K` |
The number of clusters (Number of HMM models). |

`R` |
The number of regimes (HMM components) for each cluster. |

`variance_type` |
Optional character indicating if the model is "homoskedastic" or "heteroskedastic". By default the model is "heteroskedastic". |

`order_constraint` |
Optional. A logical indicating whether or not a mask
of order one should be applied to the transition matrix of the Markov chain
to provide ordered states. For the purpose of segmentation, it must be set
to |

`init_kmeans` |
Optional. A logical indicating whether or not the curve partition should be initialized by the K-means algorithm. Otherwise the curve partition is initialized randomly. |

`n_tries` |
Optional. Number of runs of the EM algorithm. The solution providing the highest log-likelihood will be returned. If |

`max_iter` |
Optional. The maximum number of iterations for the EM algorithm. |

`threshold` |
Optional. A numeric value specifying the threshold for the relative difference of log-likelihood between two steps of the EM as stopping criteria. |

`verbose` |
Optional. A logical value indicating whether or not values of the log-likelihood should be printed during EM iterations. |

emMixHMM function implements the EM algorithm. This function starts
with an initialization of the parameters done by the method `initParam`

of
the class ParamMixHMM, then it alternates between the E-Step
(method of the class StatMixHMM) and the M-Step (method of
the class ParamMixHMM) until convergence (until the relative
variation of log-likelihood between two steps of the EM algorithm is less
than the `threshold`

parameter).

EM returns an object of class ModelMixHMM.

ModelMixHMM, ParamMixHMM, StatMixHMM

1 2 3 4 5 6 7 8 | ```
data(toydataset)
Y <- t(toydataset[,2:ncol(toydataset)])
mixhmm <- emMixHMM(Y = Y, K = 3, R = 3, verbose = TRUE)
mixhmm$summary()
mixhmm$plot()
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.