ParamTMoE-class {meteorits} | R Documentation |
A Reference Class which contains parameters of a TMoE model.
Description
ParamTMoE contains all the parameters of a TMoE model.
Fields
X
Numeric vector of length n representing the covariates/inputs
x_{1},\dots,x_{n}
.Y
Numeric vector of length n representing the observed response/output
y_{1},\dots,y_{n}
.n
Numeric. Length of the response/output vector
Y
.K
The number of experts.
p
The order of the polynomial regression for the experts.
q
The order of the logistic regression for the gating network.
alpha
Parameters of the gating network.
\boldsymbol{\alpha} = (\boldsymbol{\alpha}_{1},\dots,\boldsymbol{\alpha}_{K-1})
is a matrix of dimension(q + 1, K - 1)
, withq
the order of the logistic regression for the gating network.q
is fixed to 1 by default.beta
Polynomial regressions coefficients for each expert.
\boldsymbol{\beta} = (\boldsymbol{\beta}_{1},\dots,\boldsymbol{\beta}_{K})
is a matrix of dimension(p + 1, K)
, withp
the order of the polynomial regression.p
is fixed to 3 by default.sigma2
The variances for the
K
mixture components (matrix of size(1, K)
).nu
The degree of freedom for the Student distribution for each experts (matrix of size
(1, K)
).df
The degree of freedom of the TMoE model representing the complexity of the model.
Methods
initParam(segmental = FALSE)
Method to initialize parameters
alpha
,beta
andsigma2
.If
segmental = TRUE
thenalpha
,beta
andsigma2
are initialized by clustering the responseY
uniformly intoK
contiguous segments. Otherwise,alpha
,beta
andsigma2
are initialized by clustering randomly the responseY
intoK
segments.MStep(statTMoE, verbose_IRLS)
Method which implements the M-step of the EM algorithm to learn the parameters of the TMoE model based on statistics provided by the object
statTMoE
of class StatTMoE (which contains the E-step).