slpm_elbo: slpm_elbo

Description Usage Arguments Details Value Examples

Description

Evaluates the evidence lower bound for a given configuration of variational parameters.

Usage

1
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 K denoted delta, a_gamma and b_gamma, where K is the number of latent dimensions.

verbose

TRUE or FALSE indicating whether a lengthy output should be printed out.

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 edge ij is determined by the k-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

1
2
3
4
5
6
7
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)

SparseLPM documentation built on May 2, 2019, 3:31 a.m.