hyperposterior_clust {MagmaClustR} | R Documentation |
Compute the hyper-posterior distribution for each cluster in MagmaClust
Description
Recompute the E-step of the VEM algorithm in MagmaClust for a new set of
reference Input
. Once training is completed, it can be necessary to
evaluate the hyper-posterior distributions of the mean processes at specific
locations, for which we want to make predictions. This process is directly
implemented in the pred_magmaclust
function but the user
might want to use hyperpost_clust
for a tailored control of
the prediction procedure.
Usage
hyperposterior_clust(
trained_model = NULL,
data = NULL,
mixture = NULL,
hp_k = NULL,
hp_i = NULL,
kern_k = NULL,
kern_i = NULL,
prior_mean_k = NULL,
grid_inputs = NULL,
pen_diag = 1e-10
)
Arguments
trained_model |
A list, containing the information coming from a
Magma model, previously trained using the |
data |
A tibble or data frame. Required columns: |
mixture |
A tibble or data frame, indicating the mixture probabilities
of each cluster for each individual. Required column: |
hp_k |
A tibble or data frame of hyper-parameters
associated with |
hp_i |
A tibble or data frame of hyper-parameters
associated with |
kern_k |
A kernel function, associated with the mean GPs. Several popular kernels (see The Kernel Cookbook) are already implemented and can be selected within the following list:
|
kern_i |
A kernel function, associated with the individual GPs. ("SE",
"LIN", PERIO" and "RQ" are also available here). Recovered from
|
prior_mean_k |
The set of hyper-prior mean parameters (m_k) for the K mean GPs, one value for each cluster. cluster. This argument can be specified under various formats, such as:
|
grid_inputs |
A vector or a data frame, indicating the grid of additional reference inputs on which the mean process' hyper-posterior should be evaluated. |
pen_diag |
A number. A jitter term, added on the diagonal to prevent numerical issues when inverting nearly singular matrices. |
Value
A list containing the parameters of the mean processes' hyper-posterior distribution, namely:
mean: A list of tibbles containing, for each cluster, the hyper-posterior mean parameters evaluated at each
Input
.cov: A list of matrices containing, for each cluster, the hyper-posterior covariance parameter of the mean process.
mixture: A tibble, indicating the mixture probabilities in each cluster for each individual.
Examples
TRUE