slpm_elbo {SparseLPM} | R Documentation |
slpm_elbo
Description
Evaluates the evidence lower bound for a given configuration of variational parameters.
Usage
slpm_elbo(X, var_pars, hyper_pars, verbose = F)
Arguments
X |
Rectangular adjacency matrix with non-negative entries. |
var_pars |
A list defining the variational parameters of the model. See Details for more specific indications. |
hyper_pars |
A list defining the hyperparameters of the model. The list should contain three vectors of length |
verbose |
|
Details
The list var_pars
must contain:
- alpha_u_tilde
M*K
matrix denoting the Gaussian means for senders.- alpha_v_tilde
N*K
matrix denoting the Gaussian means for receivers.- beta_u_tilde
M*K
matrix denoting the Gaussian variances for senders.- beta_v_tilde
N*K
matrix denoting the Gaussian variances for receivers.- lambda_tilde
M*N*K
array representing the soft clustering for the edges. This may be interpreted as the posterior probability that edgeij
is determined by thek
-th latent dimension.- delta_tilde
K
dimensional vector containing the variational parameters for the mixing proportions. This may be interpreted as the importance of each latent dimension.- a_tilde
K
dimensional vector containing the shapes of the variational Gamma distributions associated to the precisions.- b_tilde
K
dimensional vector containing the rates of the variational Gamma distributions associated to the precisions.
Value
computing_time |
Number of seconds required for the evaluation. |
elbo |
Value of the ELBO for the given variational parameters. |
Examples
set.seed(12345)
M <- N <- 10
K <- 2
network <- slpm_gen(M = M, N = N, K = K)
var_pars <- slpm_init(X = network$adj, K = K)
hyper_pars <- list(delta = rep(1,K), a_gamma = rep(1,K), b_gamma = rep(1,K))
slpm_elbo(X = network$adj, var_pars = var_pars, hyper_pars = hyper_pars, verbose = FALSE)