Expectation step of the Variational EM algorithm used to compute the parameters of the hyper-posteriors distributions for the mean processes and mixture variables involved in MagmaClust.
ve_step(db, m_k, kern_k, kern_i, hp_k, hp_i, old_mixture, iter, pen_diag)
A named list, containing the elements mean
, a tibble
containing the Input and associated Output of the hyper-posterior mean
parameters, cov
, the hyper-posterior covariance matrices,
and mixture
, the probabilities to belong to each cluster for each
individual.
A tibble or data frame. Columns required: ID, Input, Output. Additional columns for covariates can be specified.
A named list of vectors, corresponding to the prior mean parameters of the K mean GPs.
A kernel function, associated with the K mean GPs.
A kernel function, associated with the M individual GPs.
A named vector, tibble or data frame of hyper-parameters
associated with kern_k
.
A named vector, tibble or data frame of hyper-parameters
associated with kern_i
.
A list of mixture values from the previous iteration.
A number, indicating the current iteration of the VEM algorithm.
A number. A jitter term, added on the diagonal to prevent numerical issues when inverting nearly singular matrices.