| ParamMRHLP-class {samurais} | R Documentation |
A Reference Class which contains the parameters of a MRHLP model.
Description
ParamMRHLP contains all the parameters of a MRHLP model. The parameters are calculated by the initialization Method and then updated by the Method implementing the M-Step of the EM algorithm.
Fields
mDataMData object representing the sample (covariates/inputs
Xand observed responses/outputsY).KThe number of regimes (MRHLP components).
pThe order of the polynomial regression.
qThe dimension of the logistic regression. For the purpose of segmentation, it must be set to 1.
variance_typeCharacter indicating if the model is homoskedastic (
variance_type = "homoskedastic") or heteroskedastic (variance_type = "heteroskedastic"). By default the model is heteroskedastic.WParameters of the logistic process.
\boldsymbol{W} = (\boldsymbol{w}_{1},\dots,\boldsymbol{w}_{K-1})is a matrix of dimension(q + 1, K - 1), withqthe order of the logistic regression.qis fixed to 1 by default.betaParameters of the polynomial regressions.
\boldsymbol{\beta} = (\boldsymbol{\beta}_{1},\dots,\boldsymbol{\beta}_{K})is an array of dimension(p + 1, d, K), withpthe order of the polynomial regression.pis fixed to 3 by default.sigma2The variances for the
Kregimes. If MRHLP model is heteroskedastic (variance_type = "heteroskedastic") thensigma2is an array of size(d, d, K)(otherwise MRHLP model is homoskedastic (variance_type = "homoskedastic") andsigma2is a matrix of size(d, d)).nuThe degree of freedom of the MRHLP model representing the complexity of the model.
phiA list giving the regression design matrices for the polynomial and the logistic regressions.
Methods
initParam(try_algo = 1)Method to initialize parameters
W,betaandsigma2.If
try_algo = 1thenbetaandsigma2are initialized by segmenting the time seriesYuniformly intoKcontiguous segments. Otherwise,W,betaandsigma2are initialized by segmenting randomly the time seriesYintoKsegments.MStep(statMRHLP, verbose_IRLS)Method which implements the M-step of the EM algorithm to learn the parameters of the MRHLP model based on statistics provided by the object
statMRHLPof class StatMRHLP (which contains the E-step).