| ParamMixHMMR-class {flamingos} | R Documentation |
A Reference Class which contains parameters of a mixture of HMMR models.
Description
ParamMixHMMR contains all the parameters of a mixture of HMMR models.
Fields
fDataFData object representing the sample (covariates/inputs
Xand observed responses/outputsY).KThe number of clusters (Number of HMMR models).
RThe number of regimes (HMMR components) for each cluster.
pThe order of the polynomial regression.
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.betaParameters of the polynomial regressions.
betais an array of dimension(p + 1, R, K), withpthe order of the polynomial regression.pis fixed to 3 by default.sigma2The variances for the
Kclusters. If MixHMMR model is heteroskedastic (variance_type = "heteroskedastic") thensigma2is a matrix of size(R, K)(otherwise MixHMMR model is homoskedastic (variance_type = "homoskedastic") andsigma2is a matrix of sizenuThe degree of freedom of the MixHMMR model representing the complexity of the model.
phiA list giving the regression design matrix for the polynomial regressions.
Methods
initParam(init_kmeans = TRUE, try_algo = 1)Method to initialize parameters
alpha,prior,trans_mat,betaandsigma2.If
init_kmeans = TRUEthen the curve partition is initialized by the K-means algorithm. Otherwise the curve partition is initialized randomly.If
try_algo = 1thenbetaandsigma2are initialized by segmenting the time seriesYuniformly intoRcontiguous segments. Otherwise,betaandsigma2are initialized by segmenting randomly the time seriesYintoRsegments.initRegressionParam(Y, k, R, phi, variance_type, try_algo)Initialize
betaandsigma2for the clusterk.MStep(statMixHMMR)Method which implements the M-step of the EM algorithm to learn the parameters of the MixHMMR model based on statistics provided by the object
statMixHMMRof class StatMixHMMR (which contains the E-step).