elbo_fun: An internal function to calculate the expected log sum...

View source: R/elbo_fun.R

elbo_funR Documentation

An internal function to calculate the expected log sum exponential term for calculation of the elbo This function takes in the parameters for all groups and output a matrix, with the element from the ith row and gth column representing the elbo calculated for the ith observation under the condition that it comes from the gth group.

Description

An internal function to calculate the expected log sum exponential term for calculation of the elbo This function takes in the parameters for all groups and output a matrix, with the element from the ith row and gth column representing the elbo calculated for the ith observation under the condition that it comes from the gth group.

Usage

elbo_fun(W, m, Vmat, V, mu, red_sig, Sig, G)

Arguments

W

count data

m

variational parameter m

Vmat

internal parameter, a matrix of n rows as n being number of observations; each row is the diagonal element of the variational parameter V.

V

variational parameter V, a list of n matrices, n being number of observations.

mu

mean parameter for the latent Gaussian variable.

red_sig

internal parameter, a list of G K*K dimensional matrices from the variance parameter.

Sig

variance parameter for the latent Gaussian variable, a list of G (K+1)*(K+1) matrices, G is the numbe of component and K+1 is the number of taxa (dimension of the count data).

G

number of components.

Examples

elbo_fun()

yuanfang90/LNMVGA documentation built on Jan. 29, 2024, 8:24 a.m.