| ParamMixHMM-class {flamingos} | R Documentation |
A Reference Class which contains parameters of a mixture of HMM models.
Description
ParamMixHMM contains all the parameters of a mixture of HMM models.
Fields
fDataFData object representing the sample (covariates/inputs
Xand observed responses/outputsY).KThe number of clusters (Number of HMM models).
RThe number of regimes (HMM components) for each cluster.
variance_typeCharacter indicating if the model is homoskedastic (
variance_type = "homoskedastic") or heteroskedastic (variance_type = "heteroskedastic"). By default the model is heteroskedastic.order_constraintA 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
TRUE(which is the default value).alphaCluster weights. Matrix of dimension
(K, 1).priorThe prior probabilities of the Markov chains.
prioris a matrix of dimension(R, K). The k-th column represents the prior distribution of the Markov chain asociated to the cluster k.trans_matThe transition matrices of the Markov chains.
trans_matis an array of dimension(R, R, K).maskMask applied to the transition matrices
trans_mat. By default, a mask of order one is applied.muMeans. Matrix of dimension
(R, K). The k-th column gives represents the k-th cluster and gives the means for theRregimes.sigma2The variances for the
Kclusters. If MixHMM model is heteroskedastic (variance_type = "heteroskedastic") thensigma2is a matrix of size(R, K)(otherwise MixHMM model is homoskedastic (variance_type = "homoskedastic") andsigma2is a matrix of size(1, K)).nuThe degrees of freedom of the MixHMM model representing the complexity of the model.
Methods
initGaussParamHmm(Y, k, R, variance_type, try_algo)Initialize the means
muandsigma2for the clusterk.initParam(init_kmeans = TRUE, try_algo = 1)Method to initialize parameters
alpha,prior,trans_mat,muandsigma2.If
init_kmeans = TRUEthen the curve partition is initialized by the K-means algorithm. Otherwise the curve partition is initialized randomly.If
try_algo = 1thenmuandsigma2are initialized by segmenting the time seriesYuniformly intoRcontiguous segments. Otherwise,muandsigma2are initialized by segmenting randomly the time seriesYintoRsegments.MStep(statMixHMM)Method which implements the M-step of the EM algorithm to learn the parameters of the MixHMM model based on statistics provided by the object
statMixHMMof class StatMixHMM (which contains the E-step).