| StatRHLP-class {samurais} | R Documentation |
A Reference Class which contains statistics of a RHLP model.
Description
StatRHLP contains all the statistics associated to a RHLP model. It mainly includes the E-Step of the EM algorithm calculating the posterior distribution of the hidden variables, as well as the calculation of the log-likelhood at each step of the algorithm and the obtained values of model selection criteria..
Fields
pi_ikMatrix of size
(m, K)representing the prior/logistic probabilities\pi_{k}(x_{i}; \boldsymbol{\Psi}) = P(z_{i} = k | \boldsymbol{x}; \Psi)of the latent variablez_{i}, i = 1,\dots,m.z_ikHard segmentation logical matrix of dimension
(m, K)obtained by the Maximum a posteriori (MAP) rule:z\_ik = 1 \ \textrm{if} \ z\_ik = \textrm{arg} \ \textrm{max}_{s} \ \pi_{s}(x_{i}; \boldsymbol{\Psi});\ 0 \ \textrm{otherwise},k = 1,\dots,K.klasColumn matrix of the labels issued from
z_ik. Its elements areklas(i) = k,k = 1,\dots,K.tau_ikMatrix of size
(m, K)giving the posterior probability that the observationY_{i}originates from thek-th regression model.polynomialsMatrix of size
(m, K)giving the values of the estimated polynomial regression components.ExColumn matrix of dimension m.
Exis the curve expectation (estimated signal): sum of the polynomial components weighted by the logistic probabilitiespi_ik.loglikNumeric. Observed-data log-likelihood of the RHLP model.
com_loglikNumeric. Complete-data log-likelihood of the RHLP model.
stored_loglikNumeric vector. Stored values of the log-likelihood at each EM iteration.
stored_com_loglikNumeric vector. Stored values of the Complete log-likelihood at each EM iteration.
BICNumeric. Value of BIC (Bayesian Information Criterion).
ICLNumeric. Value of ICL (Integrated Completed Likelihood).
AICNumeric. Value of AIC (Akaike Information Criterion).
log_piik_fikMatrix of size
(m, K)giving the values of the logarithm of the joint probabilityP(y_{i}, \ z_{i} = k | \boldsymbol{x}, \boldsymbol{\Psi}),i = 1,\dots,m.log_sum_piik_fikColumn matrix of size m giving the values of
\textrm{log} \sum_{k = 1}^{K} P(y_{i}, \ z_{i} = k | \boldsymbol{x}, \boldsymbol{\Psi}),i = 1,\dots,m.
Methods
computeLikelihood(reg_irls)Method to compute the log-likelihood.
reg_irlsis the value of the regularization part in the IRLS algorithm.computeStats(paramRHLP)Method used in the EM algorithm to compute statistics based on parameters provided by the object
paramRHLPof class ParamRHLP.EStep(paramRHLP)Method used in the EM algorithm to update statistics based on parameters provided by the object
paramRHLPof class ParamRHLP (prior and posterior probabilities).MAP()MAP calculates values of the fields
z_ikandklasby applying the Maximum A Posteriori Bayes allocation rule.z_{ik} = 1 \ \textrm{if} \ k = \textrm{arg} \ \textrm{max}_{s} \ \pi_{s}(x_{i}; \boldsymbol{\Psi});\ 0 \ \textrm{otherwise}